- 🇬🇧United Kingdom jonathanshaw Stroud, UK
Exponential backoff is a best practice. I wonder if we should implement it by default rather than making it configurable. That keeps the codebase simpler and more maintainable.
It must be possible to vary delay between job attempts based on schedule.
For example, if a task fails, 1st retry should be done after 10 seconds, 2nd one after 1 minute, 3rd one after 5 minutes, etc.
The patch adds support for specifying "retry_delay_schedule" for example as:
'retry_delay_schedule' => '5,10,60,300',
(illustrating the scenario described above).
The same time delay could also be used multiple times - for example:
'retry_delay_schedule' => '5*2,10*4,60*5,300',
would mean that:
If max attempts
value is higher than number of defined retry_delay_schedule
delays, the last delay value will be used for all the remaining attempts.
The change is 100% backwards compatible, and using 'retry_delay' => 5
still works as before. retry_delay_schedule
takes precedence over retry_delay
.
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Exponential backoff is a best practice. I wonder if we should implement it by default rather than making it configurable. That keeps the codebase simpler and more maintainable.