diff --git a/changelog.d/oban-cancel.change b/changelog.d/oban-cancel.change new file mode 100644 index 000000000..e4512d3bb --- /dev/null +++ b/changelog.d/oban-cancel.change @@ -0,0 +1 @@ +Changed some jobs to return :cancel on unrecoverable errors that should not be retried diff --git a/lib/pleroma/workers/purge_expired_activity.ex b/lib/pleroma/workers/purge_expired_activity.ex index a65593b6e..6b0799a14 100644 --- a/lib/pleroma/workers/purge_expired_activity.ex +++ b/lib/pleroma/workers/purge_expired_activity.ex @@ -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