Handle failed fetches a bit better #743

Merged
floatingghost merged 34 commits from failed-fetch-processing into develop 2024-04-19 11:25:14 +00:00
Showing only changes of commit 6d368808d3 - Show all commits

View file

@ -9,8 +9,6 @@ defmodule Pleroma.Workers.RemoteFetcherWorker do
@impl Oban.Worker @impl Oban.Worker

Multiple fetches of the same AP id can still occur if the depth arg differs; setting keys to only consider op and id should avoid this

Multiple fetches of the same AP id can still occur if the `depth` arg differs; setting `keys` to only consider `op` and `id` should avoid this
def perform(%Job{args: %{"op" => "fetch_remote", "id" => id} = args}) do def perform(%Job{args: %{"op" => "fetch_remote", "id" => id} = args}) do
{:ok, _object} = Fetcher.fetch_object_from_id(id, depth: args["depth"])
case Fetcher.fetch_object_from_id(id, depth: args["depth"]) do case Fetcher.fetch_object_from_id(id, depth: args["depth"]) do
{:ok, _object} -> {:ok, _object} ->
:ok :ok