mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-01-10 17:25:26 +00:00
Merge branch 'remove-multiple-federator-modules' into 'develop'
Fix the Federator perform/2 Oban callback See merge request pleroma/pleroma!4021
This commit is contained in:
commit
3954dfd4f1
3 changed files with 4 additions and 5 deletions
0
changelog.d/federator.skip
Normal file
0
changelog.d/federator.skip
Normal file
|
@ -117,8 +117,9 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
|
||||||
|
|
||||||
result
|
result
|
||||||
else
|
else
|
||||||
{_post_result, response} ->
|
{_post_result, response} = e ->
|
||||||
unless params[:unreachable_since], do: Instances.set_unreachable(inbox)
|
unless params[:unreachable_since], do: Instances.set_unreachable(inbox)
|
||||||
|
Logger.error("Failed to publish activity #{id} #{inspect(e)}")
|
||||||
{:error, response}
|
{:error, response}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -68,10 +68,8 @@ defmodule Pleroma.Web.Federator do
|
||||||
|
|
||||||
# Job Worker Callbacks
|
# Job Worker Callbacks
|
||||||
|
|
||||||
@spec perform(atom(), module(), any()) :: {:ok, any()} | {:error, any()}
|
@spec perform(atom(), any()) :: {:ok, any()} | {:error, any()}
|
||||||
def perform(:publish_one, module, params) do
|
def perform(:publish_one, params), do: Publisher.publish_one(params)
|
||||||
apply(module, :publish_one, [params])
|
|
||||||
end
|
|
||||||
|
|
||||||
def perform(:publish, activity) do
|
def perform(:publish, activity) do
|
||||||
Logger.debug(fn -> "Running publish for #{activity.data["id"]}" end)
|
Logger.debug(fn -> "Running publish for #{activity.data["id"]}" end)
|
||||||
|
|
Loading…
Reference in a new issue