nesquena / backburner

Simple and reliable beanstalkd job queue for ruby
http://nesquena.github.com/backburner
MIT License
429 stars 69 forks source link

Support setting max_job_retries and retry_delay on a per-tube basis #57

Open ghost opened 10 years ago

ghost commented 10 years ago

Currently the max_job_retries and retry_delay settings apply to every tube that backburner watches. For some tubes that I'm processing I'd like a large number of retries for, while for others others I'd like a single retry. It would be great if back burner could be configured to support this.

nesquena commented 10 years ago

Yeah I think you are right, would be great for this to be configurable per queue. Thanks for the suggestion!

boncey commented 5 years ago

I'm having a crack at implementing this. I'd welcome any feedback on my first commit.

The parts I'm unsure about are twofold.

  1. how to best test the work_one_job method. It seems to only be tested from each worker and I'm not sure which worker to test with.

  2. There's a partial implementation of per-queue retry_limit but only for certain workers. I guess this would behave the same as the per-queue max_job_retries that would become part of my MR. Is that likely to be an issue? I don't really want to touch the individual workers if I can help it.

Any feedback welcome. Am I on the right track? Is this MR likely to be accepted?

Thanks. Darren.

nesquena commented 5 years ago

Yes if you finish and one or two others can run and give a thumbs up we are happy to merge this. Also it’d be great if you could add a section in the readme.

  1. Pick the simplest worker to add tests for first
  2. Yep I think that makes sense

I think you are on the right track but I’ll take another pass through later.

boncey commented 5 years ago

⬆️ PR raised. Comments welcome!