forked from YokaiRick/akkoma
Merge branch 'fix/mix-tasks' into 'develop'
Start limiters in mix tasks Closes #2320 See merge request pleroma/pleroma!3165
This commit is contained in:
commit
d8924e1a56
2 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,7 @@ defmodule Mix.Pleroma do
|
|||
def start_pleroma do
|
||||
Pleroma.Config.Holder.save_default()
|
||||
Pleroma.Config.Oban.warn()
|
||||
Pleroma.Application.limiters_setup()
|
||||
Application.put_env(:phoenix, :serve_endpoints, false, persistent: true)
|
||||
|
||||
if Pleroma.Config.get(:env) != :test do
|
||||
|
|
|
@ -274,6 +274,7 @@ defp http_children(Tesla.Adapter.Gun, _) do
|
|||
|
||||
defp http_children(_, _), do: []
|
||||
|
||||
@spec limiters_setup() :: :ok
|
||||
def limiters_setup do
|
||||
[Pleroma.Web.RichMedia.Helpers, Pleroma.Web.MediaProxy]
|
||||
|> Enum.each(&ConcurrentLimiter.new(&1, 1, 0))
|
||||
|
|
Loading…
Reference in a new issue