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) ++
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("instances", default_ttl: :timer.hours(24), ttl_interval: 1000, limit: 2500),
- build_cachex("request_signatures", default_ttl: :timer.hours(24 * 30), limit: 3000)
+ build_cachex("request_signatures", default_ttl: :timer.hours(24 * 30), limit: 3000),
+ build_cachex("rel_me", default_ttl: :timer.hours(24 * 30), limit: 300)
]
end
]
end
+ @spec task_children(atom()) :: [map()]
+
defp task_children(:test) do
[
%{
]
end
+ @spec elasticsearch_children :: [Pleroma.Search.Elasticsearch.Cluster]
def elasticsearch_children do
config = Config.get([Pleroma.Search, :module])
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)