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

This commit is contained in:
Mark Felder 2024-07-20 21:24:13 -04:00
parent e509519db4
commit b8503f1ad4
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1 @@
PollWorker jobs will not retry if the activity no longer exists.

View file

@ -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