logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: b8503f1ad412df72af2dc2d975d29e8810143667
parent e509519db4fe6c9c0c3942ebd9ccb540439fba18
Author: Mark Felder <feld@feld.me>
Date:   Sat, 20 Jul 2024 21:24:13 -0400

PollWorker jobs will not retry if the activity no longer exists.

Diffstat:

Achangelog.d/oban-cancel-poll-result.change1+
Mlib/pleroma/workers/poll_worker.ex3+++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/changelog.d/oban-cancel-poll-result.change b/changelog.d/oban-cancel-poll-result.change @@ -0,0 +1 @@ +PollWorker jobs will not retry if the activity no longer exists. diff --git a/lib/pleroma/workers/poll_worker.ex b/lib/pleroma/workers/poll_worker.ex @@ -17,6 +17,9 @@ defmodule Pleroma.Workers.PollWorker do with %Activity{} = activity <- find_poll_activity(activity_id), {:ok, notifications} <- Notification.create_poll_notifications(activity) do Notification.stream(notifications) + else + {:error, :poll_activity_not_found} = e -> {:cancel, e} + e -> {:error, e} end end