collectiveidea / delayed_job

Database based asynchronous priority queue system -- Extracted from Shopify
http://groups.google.com/group/delayed_job
MIT License
4.81k stars 955 forks source link

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

Open tomyyn opened 3 months ago

tomyyn commented 3 months ago

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?