Any plan to allow a configurable RetryPolicy per Command rather than a global or hardcoded one in the RetryAttribute?
How are you executing your command, are you using the Commands Feature or Background Jobs? And what is the use-case you’re running into that would need a per-command instance retry policy that’s different to the hard-coded [Retry]
policy on the Command type?
Hi @mythz,
I currently use it with the BackgroundJobs. I have a command that will enqueue my command that needs a retry and delay. One case I see for that is when we run the API from different environments and we get the delay let’s say from a call to a database. We also run our process in real or simulated mode and the value would then change.
ok, it’s not currently possible since Commands are not executed with any per instance context or configuration so any configuration for it can only be registered against the command Type.
There is a RetryLimit
which can be configured when Enqueuing a Job Command or you can change the default retry limit.
Otherwise you could change behavior between production and test/debug builds with a conditional symbol:
#if !DEBUG
[Retry]
#endif