nesquena / backburner

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

NoMethodError (undefined method `queue_max_job_retries' for TestJob:Class) #173

Closed vishakhakt closed 2 years ago

vishakhakt commented 2 years ago

Using backburner gem 1.5.0

The default config sets max_job_retries as 3.

Backburner.configure do |config|
   config.max_job_retries  = 3
end

For a specific job, I want to set the retries to 0

class TestJob
  include Backburner::Queue
  queue "test-job"
  queue_priority 100
  queue_respond_timeout 300
  queue_max_job_retries 0

But, adding that, I get the error - NoMethodError (undefined method 'queue_max_job_retries' for TestJob:Class)

I also tried setting it as shown in the documents -

def self.queue_max_job_retries
    0
end

But that has no effect. It still retries it 3 times.

nesquena commented 2 years ago

Thanks for the report!

Unfortunately, I am no longer actively coding on this gem though I still use it myself in a few projects. I would be more than happy to merge PRs or cut releases though if someone decides to fix this!

vishakhakt commented 2 years ago

This merged PR - https://github.com/nesquena/backburner/pull/162 - should have fixed this issue. But looks like its not included in the gem release?

nesquena commented 2 years ago

@vishakhakt Backburner 1.6.0 has been cut now with these changes merged! Can you confirm?