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)
end
@impl Oban.Worker
def timeout(_job), do: :timer.seconds(5)
end

View File

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

View File

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

View File

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

View File

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