Oban jobs should be discarded on permanent errors

This commit is contained in:
Mark Felder 2023-12-28 23:52:05 -05:00
commit f17f92105b
2 changed files with 9 additions and 9 deletions

View file

@ -16,19 +16,19 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do
:ok
{:error, :forbidden} ->
{:cancel, :forbidden}
{:discard, :forbidden}
{:error, :not_found} ->
{:cancel, :not_found}
{:discard, :not_found}
{:error, :allowed_depth} ->
{:cancel, :allowed_depth}
{:discard, :allowed_depth}
_ ->
:error
end
else
{:cancel, "Unreachable instance"}
{:discard, "Unreachable instance"}
end
end