Oban jobs should be discarded on permanent errors
This commit is contained in:
parent
aa070c7daf
commit
f17f92105b
2 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue