Define missing Oban timeouts

This commit is contained in:
Mark Felder 2024-07-15 10:15:23 -04:00
parent 0ea63d824e
commit 1e8d1904e6
6 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1 @@
Ensure all Oban jobs have timeouts defined

View file

@ -58,4 +58,7 @@ defmodule Pleroma.Workers.Cron.DigestEmailsWorker do
User.touch_last_digest_emailed_at(user) User.touch_last_digest_emailed_at(user)
end end
@impl Oban.Worker
def timeout(_job), do: :timer.seconds(5)
end end

View file

@ -60,4 +60,7 @@ defmodule Pleroma.Workers.Cron.NewUsersDigestWorker do
:ok :ok
end end
@impl Oban.Worker
def timeout(_job), do: :timer.seconds(5)
end end

View file

@ -16,4 +16,7 @@ defmodule Pleroma.Workers.RichMediaWorker do
def perform(%Job{args: %{"op" => "backfill", "url" => _url} = args}) do def perform(%Job{args: %{"op" => "backfill", "url" => _url} = args}) do
Backfill.run(args) Backfill.run(args)
end end
@impl Oban.Worker
def timeout(_job), do: :timer.seconds(5)
end end

View file

@ -20,4 +20,7 @@ defmodule Pleroma.Workers.SearchIndexingWorker do
search_module.remove_from_index(object) search_module.remove_from_index(object)
end end
@impl Oban.Worker
def timeout(_job), do: :timer.seconds(5)
end end

View file

@ -11,4 +11,7 @@ defmodule Pleroma.Workers.UserRefreshWorker do
def perform(%Job{args: %{"ap_id" => ap_id}}) do def perform(%Job{args: %{"ap_id" => ap_id}}) do
User.fetch_by_ap_id(ap_id) User.fetch_by_ap_id(ap_id)
end end
@impl Oban.Worker
def timeout(_job), do: :timer.seconds(5)
end end