X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fapplication.ex;h=26b500dc832eccd63241fcf5981b2aa84915f869;hb=refs%2Fheads%2Fdevelop;hp=adccd7c5dfbc087fbec54e90b287b031c597c03b;hpb=2641dcdd15791cdee908fd167309a646c1742e31;p=akkoma diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex index adccd7c5d..26b500dc8 100644 --- a/lib/pleroma/application.ex +++ b/lib/pleroma/application.ex @@ -73,7 +73,8 @@ defmodule Pleroma.Application do Pleroma.JobQueueMonitor, {Majic.Pool, [name: Pleroma.MajicPool, pool_size: Config.get([:majic_pool, :size], 2)]}, {Oban, Config.get(Oban)}, - Pleroma.Web.Endpoint + Pleroma.Web.Endpoint, + Pleroma.Web.Telemetry ] ++ elasticsearch_children() ++ task_children(@mix_env) ++ @@ -156,7 +157,9 @@ defmodule Pleroma.Application do build_cachex("emoji_packs", expiration: emoji_packs_expiration(), limit: 10), build_cachex("failed_proxy_url", limit: 2500), build_cachex("banned_urls", default_ttl: :timer.hours(24 * 30), limit: 5_000), - build_cachex("translations", default_ttl: :timer.hours(24 * 30), limit: 2500) + build_cachex("translations", default_ttl: :timer.hours(24 * 30), limit: 2500), + build_cachex("instances", default_ttl: :timer.hours(24), ttl_interval: 1000, limit: 2500), + build_cachex("request_signatures", default_ttl: :timer.hours(24 * 30), limit: 3000) ] end @@ -196,6 +199,8 @@ defmodule Pleroma.Application do ] end + @spec task_children(atom()) :: [map()] + defp task_children(:test) do [ %{ @@ -221,6 +226,7 @@ defmodule Pleroma.Application do ] end + @spec elasticsearch_children :: [Pleroma.Search.Elasticsearch.Cluster] def elasticsearch_children do config = Config.get([Pleroma.Search, :module]) @@ -253,10 +259,12 @@ defmodule Pleroma.Application do defp http_children do proxy_url = Config.get([:http, :proxy_url]) proxy = Pleroma.HTTP.AdapterHelper.format_proxy(proxy_url) + pool_size = Config.get([:http, :pool_size]) config = [:http, :adapter] |> Config.get([]) + |> Pleroma.HTTP.AdapterHelper.add_pool_size(pool_size) |> Pleroma.HTTP.AdapterHelper.maybe_add_proxy_pool(proxy) |> Keyword.put(:name, MyFinch)