delayed_job icon indicating copy to clipboard operation
delayed_job copied to clipboard

Job-level max_run_time not being taken into account after worker crash.

Open tomyyn opened this issue 11 months ago • 1 comments

Open this issue after not getting a response from this comment: https://github.com/collectiveidea/delayed_job/issues/832#issuecomment-1930342987

Currently, we are implementing job-level max_run_time for our application. Normally, if the process doesn't die, it works as expected. However, When restarting after a worker process crash, the job-level max_run_time is ignored, and only Worker.max_run_time is taken into cosideration.

As we run in a containerised environment, sometimes, containers that may have initiated processing a job are killed due to scaling down, but job remains in locked state until default max_run_time (Worker.max_run_time).

Is there any solution for this? If not, is it in the plans to implement it?

tomyyn avatar Mar 20 '24 17:03 tomyyn

There is no known solution AFAIK within delayed_job to resolve this however there is a package that tracks locked jobs and can unlock them provided your params:

https://github.com/salsify/delayed_job_heartbeat_plugin

lreddickGNA avatar Jul 24 '24 14:07 lreddickGNA