Reputation: 70
I have a RoR application that uses delayed jobs to run a large number of HTTP API calls, which are used to send bulk SMSs.
But, in unexpected scenarios, any one of these jobs is getting locked, not letting any of the jobs after it to be executed even if a fresh request is initiated. This continues until I set the locked_by
value to NULL
, followed by manually running these jobs, else the jobs are not processed. (I have the locked_by
value in delayed_jobs
table as "<Server's Name>"
.)
Please guide me how to handle the delayed jobs in the scenarios described above.
Upvotes: 0
Views: 610
Reputation: 1313
Have you set the parameters available to handle these things ? Like :
Delayed::Worker.destroy_failed_jobs, Delayed::Worker.sleep_delay
Delayed::Worker.max_attempts, Delayed::Worker.max_run_time
??
Upvotes: 1