Moving some background jobs into simple tasks

- fetching activity data
- attachment prefetching
- using limiter to prevent overload
This commit is contained in:
Alexander Strizhakov 2020-09-10 10:54:57 +03:00
commit 8d218ebaf5
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
11 changed files with 58 additions and 40 deletions

View file

@ -78,11 +78,6 @@ defmodule Pleroma.Web.RichMedia.Helpers do
def fetch_data_for_activity(_), do: %{}
def perform(:fetch, %Activity{} = activity) do
fetch_data_for_activity(activity)
:ok
end
def rich_media_get(url) do
headers = [{"user-agent", Pleroma.Application.user_agent() <> "; Bot"}]