Wednesday, January 13, 2010

Delayed Job changing job parameters in Rails

by Sandip Ransing 0 comments

Delayed job variables initialization written on at collectiveidea / delayed_job doesn't work.
# config/initializers/delayed_job_config.rb Delayed::Worker.destroy_failed_jobs = false Delayed::Worker.sleep_delay = 60 Delayed::Worker.max_attempts = 3 Delayed::Worker.max_run_time = 5.minutes
Here is the correct way of doing it as mentioned on tobi / delayed_job
# 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

blog comments powered by Disqus

About The Author

Sandip is a ruby on rails developer based in pune and also a blogger at funonrails. Opensource contributor and working with Josh software Private Limited. for more info read Follow Sandip on Twitter for updates.

Connect With Me...

Github Projects

@sandipransing Twitter