alphasights / sneakers_handlers

Retries with exponential backoff for sneakers
MIT License
33 stars 11 forks source link

Do not increment retries if requeue was called #36

Open ngoral opened 4 years ago

ngoral commented 4 years ago

I just faced the problem that sometimes I want to just re-enqueue a message without incrementing its retries count.

To be more concrete: we use RabbitMQ for handling background jobs. And sometimes a consumer can accept a task that cannot be run right now 'cause of another task running right now. It does not mean that task failed and we want it to retry, we just want to postpone it launching a bit and have all the retries with it.

I am ready to open a PR if you find this feature useful in your gem and thing that someone can profit from it too. The only thing I don't know in that case is how to allow a user to configure this setting best. So any thoughts are appreciated