Moving some background jobs into simple tasks
- fetching activity data - attachment prefetching - using limiter to prevent overload
This commit is contained in:
parent
88f6b61a5e
commit
8d218ebaf5
11 changed files with 58 additions and 40 deletions
|
|
@ -57,6 +57,7 @@ defmodule Pleroma.Application do
|
|||
setup_instrumenters()
|
||||
load_custom_modules()
|
||||
Pleroma.Docs.JSON.compile()
|
||||
limiters_setup()
|
||||
|
||||
adapter = Application.get_env(:tesla, :adapter)
|
||||
|
||||
|
|
@ -273,4 +274,9 @@ defmodule Pleroma.Application do
|
|||
end
|
||||
|
||||
defp http_children(_, _), do: []
|
||||
|
||||
def limiters_setup do
|
||||
[Pleroma.Web.RichMedia.Helpers, Pleroma.Web.MediaProxy]
|
||||
|> Enum.each(&ConcurrentLimiter.new(&1, 1, 0))
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue