Add option to modify HTTP pool size
[akkoma] / lib / pleroma / application.ex
index 48a2623ceb8e74c84868f932b196a55885dd1db4..26b500dc832eccd63241fcf5981b2aa84915f869 100644 (file)
@@ -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) ++
@@ -258,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)