Hi! Thanks for django-subatomic - it has been very useful in our project!
We’d like to request a built-in settings flag to toggle durable.
Current behavior
durable is always active once applied as a decorator.
Why this is needed
durable is an excellent strict guard for development/CI, but in production it can be too strict as always-on runtime behavior:
- it adds transaction-state checks around each decorated call;
- on failure, it raises immediately (which is correct semantically), but in production this can translate into user-facing request/job failures;
At the moment, we solve this with a local wrapper and project-level feature flag.
Proposal
Add an optional setting in the library, for example:
SUBATOMIC_DURABLE_ENABLED (default True for backward compatibility)
Expected behavior:
- if
True: keep current durable behavior unchanged;
- if
False: return the original function (no durable guard checks).
This would let teams control strictness per environment without maintaining custom wrappers in every codebase.
As a follow-up: the same kind of toggle would also be very useful for transaction_required.
If this direction is approved, I can implement it and open a PR :)
Hi! Thanks for
django-subatomic- it has been very useful in our project!We’d like to request a built-in settings flag to toggle
durable.Current behavior
durableis always active once applied as a decorator.Why this is needed
durableis an excellent strict guard for development/CI, but in production it can be too strict as always-on runtime behavior:At the moment, we solve this with a local wrapper and project-level feature flag.
Proposal
Add an optional setting in the library, for example:
SUBATOMIC_DURABLE_ENABLED(defaultTruefor backward compatibility)Expected behavior:
True: keep currentdurablebehavior unchanged;False: return the original function (no durable guard checks).This would let teams control strictness per environment without maintaining custom wrappers in every codebase.
As a follow-up: the same kind of toggle would also be very useful for
transaction_required.If this direction is approved, I can implement it and open a PR :)