seomoz / qless-core

Core Lua Scripts for qless
MIT License
85 stars 33 forks source link

max_retries seems a bit restrictive, design-wise #38

Open miracle2k opened 10 years ago

miracle2k commented 10 years ago

If I want a progressive delay logic, i.e. incrementally increasing delay time, I need to do this myself in the worker when calling retry(). I might want to limit the retry by time (30 days) rather than count.

Given that, it doesn't make sense to me that the worker must worry about the producer not queuing up the job with the correct number of retries. I basically say max_retries=99999 now, which is ugly.

What I'd like to see is the retry() command gaining an option that allows users to skip the default max_retries logic, and allow the worker to decide if the retries have been exhausted.