commit: 3954dfd4f1881845a60f117a86ef96f3997c6c3c
parent 7f3a83d3ed2d5dcc1dff699c9de8a6d247063055
Author: feld <feld@feld.me>
Date: Fri, 29 Dec 2023 04:33:45 +0000
Merge branch 'remove-multiple-federator-modules' into 'develop'
Fix the Federator perform/2 Oban callback
See merge request pleroma/pleroma!4021
Diffstat:
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/changelog.d/federator.skip b/changelog.d/federator.skip
diff --git a/lib/pleroma/web/activity_pub/publisher.ex b/lib/pleroma/web/activity_pub/publisher.ex
@@ -117,8 +117,9 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
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
diff --git a/lib/pleroma/web/federator.ex b/lib/pleroma/web/federator.ex
@@ -68,10 +68,8 @@ defmodule Pleroma.Web.Federator do
# 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)