Skip to content

Loading…

NoMethodError: undefined method `destroy_failed_jobs #44

Closed
erwin16 opened this Issue · 2 comments

2 participants

@erwin16

I just installed the gem as per ReadMe instructions ( gem in gemfile, migration perfomed)

inserted into /config/initializers/delayed_job_config.rb
Delayed::Job.destroy_failed_jobs = false
silence_warnings do
Delayed::Job.const_set("MAX_ATTEMPTS", 3)
Delayed::Job.const_set("MAX_RUN_TIME", 5.minutes)
end

added require 'delayed_job' in my /config/environment.rb

the just trying to open the console got :

.rvm/gems/ruby-1.9.2-p180@rails3/gems/activerecord-3.0.7/lib/active_record/base.rb:1009:in method_missing': undefined methoddestroy_failed_jobs=' for #Class:0x00000104bd7720 (NoMethodError)
from /Users/yves/Sites/rails/testsbga/config/initializers/delayed_job_config.rb:1

@erwin16

transfered to google group

@erwin16 erwin16 closed this
@paulyoder

The API has changed for Delayed::Job. This is how you override the max attempts and max run time now

# config/initializers/delayed_job_config.rb
Delayed::Worker.max_attempts = 3
Delayed::Worker.max_run_time = 5.minutes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.