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.
This commit is contained in:
Daniel Da Cunha 2025-12-19 22:17:42 +08:00
parent 67d8bd5598
commit 31a72e8f01

View file

@ -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},