projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix tests relying on old behavior. Use the Upload.base_url, Luke.
[akkoma]
/
lib
/
pleroma
/
application.ex
diff --git
a/lib/pleroma/application.ex
b/lib/pleroma/application.ex
index f2a8c7825c544bd1fa11da1bb763bacfd0afd7f8..bd568d8580c75539cc88354823cccbfcdc93b3b9 100644
(file)
--- a/
lib/pleroma/application.ex
+++ b/
lib/pleroma/application.ex
@@
-57,6
+57,7
@@
defmodule Pleroma.Application do
setup_instrumenters()
load_custom_modules()
Pleroma.Docs.JSON.compile()
setup_instrumenters()
load_custom_modules()
Pleroma.Docs.JSON.compile()
+ limiters_setup()
adapter = Application.get_env(:tesla, :adapter)
adapter = Application.get_env(:tesla, :adapter)
@@
-116,7
+117,7
@@
defmodule Pleroma.Application do
result
end
result
end
- defp set_postgres_server_version
()
do
+ defp set_postgres_server_version do
version =
with %{rows: [[version]]} <- Ecto.Adapters.SQL.query!(Pleroma.Repo, "show server_version"),
{num, _} <- Float.parse(version) do
version =
with %{rows: [[version]]} <- Ecto.Adapters.SQL.query!(Pleroma.Repo, "show server_version"),
{num, _} <- Float.parse(version) do
@@
-130,7
+131,7
@@
defmodule Pleroma.Application do
9.6
end
9.6
end
-
Application.put_env(:postgres, :version
, version)
+
:persistent_term.put({Pleroma.Repo, :postgres_version}
, version)
end
def load_custom_modules do
end
def load_custom_modules do
@@
-293,4
+294,10
@@
defmodule Pleroma.Application do
end
defp http_children(_, _), do: []
end
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))
+ end
end
end