From 08ba9a15b2b5fe6896197ab947bc59d57f4845c8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 28 Dec 2023 22:51:47 -0500 Subject: [PATCH 1/3] Fix the Federator perform/2 Oban callback --- lib/pleroma/web/federator.ex | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/pleroma/web/federator.ex b/lib/pleroma/web/federator.ex index 6deebb963..1f2c3835a 100644 --- a/lib/pleroma/web/federator.ex +++ b/lib/pleroma/web/federator.ex @@ -68,10 +68,8 @@ defp publish_priority(_), do: 0 # Job Worker Callbacks - @spec perform(atom(), module(), any()) :: {:ok, any()} | {:error, any()} - def perform(:publish_one, module, params) do - apply(module, :publish_one, [params]) - end + @spec perform(atom(), any()) :: {:ok, any()} | {:error, any()} + def perform(:publish_one, params), do: Publisher.publish_one(params) def perform(:publish, activity) do Logger.debug(fn -> "Running publish for #{activity.data["id"]}" end) From efd50759d587977a52db01ef6ececc961c736604 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 28 Dec 2023 22:59:27 -0500 Subject: [PATCH 2/3] Log errors when publishing activities --- lib/pleroma/web/activity_pub/publisher.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex index bb8209232..e0dd2e7c9 100644 --- a/lib/pleroma/web/activity_pub/publisher.ex +++ b/lib/pleroma/web/activity_pub/publisher.ex @@ -117,8 +117,9 @@ def publish_one(%{inbox: inbox, json: json, actor: %User{} = actor, id: id} = pa result else - {_post_result, response} -> + {_post_result, response} = e -> unless params[:unreachable_since], do: Instances.set_unreachable(inbox) + Logger.error("Failed to publish activity #{id} #{inspect(e)}") {:error, response} end end From d519a535e1a23d348d54907cf49215b83257bb32 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 28 Dec 2023 23:32:21 -0500 Subject: [PATCH 3/3] Changelog --- changelog.d/federator.skip | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 changelog.d/federator.skip diff --git a/changelog.d/federator.skip b/changelog.d/federator.skip new file mode 100644 index 000000000..e69de29bb