Open medihack opened 3 days ago
It makes sense!
I'm not sure about the API you suggested: change is implying add and it's a bit weird.
What about either
RetryStrategy(priority_increment=2)
Or
RetryStrategy(update_priority=lambda attempts: 5+2*attempts)
?
Yes, I really like the lambda usage. How about RetryStrategy(update_priority=lambda job: 5+2*job.attempts)
? With access to the job, it's even possible to get the current priority.
Ok !
A nice additional feature would be to change the priority when retrying a job. For example, I would like to slightly increase the priority when a job fails and will be retried. Maybe we could use an additional parameter like
RetryStrategy(change_priority=2)
to increase it by 2.