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
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue