Fix Oban jobs exiting with :error instead of :cancel
This commit is contained in:
parent
6278af209a
commit
2e2caad28d
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 New Issue
Block a user