Skip to content
Snippets Groups Projects
Commit 57d11ac9 authored by kaniini's avatar kaniini
Browse files

activitypub: move post rich media fetching to job queue

parent 32d4630c
Branches
Tags
No related merge requests found
......@@ -133,9 +133,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
activity
end
Task.start(fn ->
Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
end)
PleromaJobQueue.enqueue(:background, Pleroma.Web.RichMedia.Helpers, [:fetch, activity])
Notification.create_notifications(activity)
......
......@@ -34,4 +34,6 @@ defmodule Pleroma.Web.RichMedia.Helpers do
end
def fetch_data_for_activity(_), do: %{}
def perform(:fetch, %Activity{} = activity), do: fetch_data_for_activity(activity)
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment