logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 2e2caad28db9dbc7342ac706bc743ec393c2e7e4
parent 6278af209af00594c4d1ae37410da629e02b4df2
Author: Mark Felder <feld@feld.me>
Date:   Mon, 15 Jul 2024 10:23:03 -0400

Fix Oban jobs exiting with :error instead of :cancel

Diffstat:

Achangelog.d/oban-cancel.change1+
Mlib/pleroma/workers/purge_expired_activity.ex4++--
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/changelog.d/oban-cancel.change 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 @@ -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