Merge branch 'cycles-side-effects' into 'develop'

Recompilation speedup: Switch to runtime deps in ActivityPub.SideEffects

See merge request pleroma/pleroma!3460
This commit is contained in:
Haelwenn 2021-06-09 01:54:38 +00:00
commit eba3c7b42f

View File

@ -28,11 +28,12 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
require Logger require Logger
@cachex Pleroma.Config.get([:cachex, :provider], Cachex) @cachex Pleroma.Config.get([:cachex, :provider], Cachex)
@ap_streamer Pleroma.Config.get([:side_effects, :ap_streamer], ActivityPub)
@logger Pleroma.Config.get([:side_effects, :logger], Logger) @logger Pleroma.Config.get([:side_effects, :logger], Logger)
@behaviour Pleroma.Web.ActivityPub.SideEffects.Handling @behaviour Pleroma.Web.ActivityPub.SideEffects.Handling
defp ap_streamer, do: Pleroma.Config.get([:side_effects, :ap_streamer], ActivityPub)
@impl true @impl true
def handle(object, meta \\ []) def handle(object, meta \\ [])
@ -302,8 +303,8 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
MessageReference.delete_for_object(deleted_object) MessageReference.delete_for_object(deleted_object)
@ap_streamer.stream_out(object) ap_streamer().stream_out(object)
@ap_streamer.stream_out_participations(deleted_object, user) ap_streamer().stream_out_participations(deleted_object, user)
:ok :ok
else else
{:actor, _} -> {:actor, _} ->