use :discard instead of cancel

This commit is contained in:
FloatingGhost 2022-08-11 19:17:50 +01:00
parent ceeeefc707
commit d3b9cfb03f

View file

@ -12,8 +12,8 @@ def perform(%Job{args: %{"op" => "incoming_ap_doc", "params" => params}}) do
with {:ok, res} <- Federator.perform(:incoming_ap_doc, params) do with {:ok, res} <- Federator.perform(:incoming_ap_doc, params) do
{:ok, res} {:ok, res}
else else
{:error, :origin_containment_failed} -> {:cancel, :origin_containment_failed} {:error, :origin_containment_failed} -> {:discard, :origin_containment_failed}
{:error, {:reject, reason}} -> {:cancel, reason} {:error, {:reject, reason}} -> {:discard, reason}
e -> e e -> e
end end
end end