From 31a72e8f01f8f09492e2f65fd18d05eab5377db6 Mon Sep 17 00:00:00 2001 From: Daniel Da Cunha Date: Fri, 19 Dec 2025 22:17:42 +0800 Subject: [PATCH] Add Oban Lifeline plugin to rescue orphaned jobs Jobs stuck in "executing" state for more than 30 minutes (e.g. after a container restart) will automatically be rescued and retried. --- config/runtime.exs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/runtime.exs b/config/runtime.exs index 5624bfe..62ed2eb 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -61,6 +61,8 @@ config :pinchflat, Oban, plugins: [ # Keep old jobs for 30 days for display in the UI {Oban.Plugins.Pruner, max_age: 30 * 24 * 60 * 60}, + # Rescue orphaned jobs stuck in "executing" state after crash/restart + {Oban.Plugins.Lifeline, rescue_after: :timer.minutes(30)}, {Oban.Plugins.Cron, crontab: [ {"#{current_minute} #{current_hour} * * *", Pinchflat.YtDlp.UpdateWorker},