projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#3213] Performance-related stat in HashtagsTableMigrator. Reworked `count/_` to...
[akkoma]
/
lib
/
pleroma
/
application.ex
diff --git
a/lib/pleroma/application.ex
b/lib/pleroma/application.ex
index 17a241cdfddb628a3653997aa17cc8323fb79c5f..a9a8fb9c21c331cc28406b1357985b903bfb2f74 100644
(file)
--- a/
lib/pleroma/application.ex
+++ b/
lib/pleroma/application.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Application do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Application do
@@
-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)
@@
-103,7
+104,8
@@
defmodule Pleroma.Application do
chat_child(chat_enabled?()) ++
[
Pleroma.Web.Endpoint,
chat_child(chat_enabled?()) ++
[
Pleroma.Web.Endpoint,
- Pleroma.Gopher.Server
+ Pleroma.Gopher.Server,
+ Pleroma.Migrators.HashtagsTableMigrator
]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
@@
-130,7
+132,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
+295,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