mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-22 16:16:34 +00:00
Fix Oban jobs exiting with :error instead of :cancel
This commit is contained in:
parent
6278af209a
commit
2e2caad28d
2 changed files with 3 additions and 2 deletions
1
changelog.d/oban-cancel.change
Normal file
1
changelog.d/oban-cancel.change
Normal file
|
@ -0,0 +1 @@
|
|||
Changed some jobs to return :cancel on unrecoverable errors that should not be retried
|
|
@ -46,13 +46,13 @@ defmodule Pleroma.Workers.PurgeExpiredActivity do
|
|||
|
||||
defp find_activity(id) do
|
||||
with nil <- Activity.get_by_id_with_object(id) do
|
||||
{:error, :activity_not_found}
|
||||
{:cancel, :activity_not_found}
|
||||
end
|
||||
end
|
||||
|
||||
defp find_user(ap_id) do
|
||||
with nil <- Pleroma.User.get_by_ap_id(ap_id) do
|
||||
{:error, :user_not_found}
|
||||
{:cancel, :user_not_found}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue