Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>
delayed_jobs: set max_run_time for jobs to run
config/initializers/delayed_job_config.rb | 1 +
diff --git a/config/initializers/delayed_job_config.rb b/config/initializers/delayed_job_config.rb index 6bfc77ded2a259d0c1f9d38b2f838fe7dc97b430..ac48e96fe292c62d8187e5b1ee3c4a299bdcf738 100644 --- a/config/initializers/delayed_job_config.rb +++ b/config/initializers/delayed_job_config.rb @@ -3,6 +3,7 @@ Delayed::Worker.backend = :active_record Delayed::Worker.max_attempts = 2 Delayed::Worker.destroy_failed_jobs = false Delayed::Worker.logger = Logger.new(File.join(Rails.root, 'log', 'delayed_job.log')) +Delayed::Worker.max_run_time = 5.minutes class Delayed::Job def self.handler_like(handler)