Oban: change :discard return values to :cancel
:discard will be removed in Oban 3.0. It was only meant for internal use.
This commit is contained in:
parent
3754713599
commit
f52b229baa
5 changed files with 12 additions and 12 deletions
|
|
@ -123,9 +123,9 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
|
|||
Logger.error("Publisher failed to inbox #{inbox} with status #{code}")
|
||||
|
||||
case response do
|
||||
%{status: 403} -> {:discard, :forbidden}
|
||||
%{status: 404} -> {:discard, :not_found}
|
||||
%{status: 410} -> {:discard, :not_found}
|
||||
%{status: 403} -> {:cancel, :forbidden}
|
||||
%{status: 404} -> {:cancel, :not_found}
|
||||
%{status: 410} -> {:cancel, :not_found}
|
||||
_ -> {:error, e}
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -14,16 +14,16 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do
|
|||
:ok
|
||||
|
||||
{:rejected, reason} ->
|
||||
{:discard, reason}
|
||||
{:cancel, reason}
|
||||
|
||||
{:error, :forbidden} ->
|
||||
{:discard, :forbidden}
|
||||
{:cancel, :forbidden}
|
||||
|
||||
{:error, :not_found} ->
|
||||
{:discard, :not_found}
|
||||
{:cancel, :not_found}
|
||||
|
||||
{:error, :allowed_depth} ->
|
||||
{:discard, :allowed_depth}
|
||||
{:cancel, :allowed_depth}
|
||||
|
||||
{:error, _} = e ->
|
||||
e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue