summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-08-12 15:53:06 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2020-09-24 10:12:05 +0300
commitdb51f15ab85e2b1e3dfcc7ed583d703a0465504d (patch)
tree962d5afd7b5c838e99e2a16339fa111fd642dc47
parent4173fef995c90946a7f0b33d696da53507c34664 (diff)
start http children from supervisors in mix tasks
-rw-r--r--lib/mix/pleroma.ex27
1 files changed, 9 insertions, 18 deletions
diff --git a/lib/mix/pleroma.ex b/lib/mix/pleroma.ex
index 9c7507c21..2c84f939e 100644
--- a/lib/mix/pleroma.ex
+++ b/lib/mix/pleroma.ex
@@ -35,22 +35,20 @@ defmodule Mix.Pleroma do
Enum.each(apps, &Application.ensure_all_started/1)
- children =
- [
- Pleroma.Repo,
- Supervisor.child_spec({Task, &Pleroma.Config.Environment.load_and_update/0},
- id: :update_env
- ),
- Pleroma.Web.Endpoint,
- {Oban, Pleroma.Config.get(Oban)}
- ] ++
- http_children(adapter)
+ children = [
+ Pleroma.Repo,
+ Supervisor.child_spec({Task, &Pleroma.Config.Environment.load_and_update/0},
+ id: :update_env
+ ),
+ Pleroma.Web.Endpoint,
+ {Oban, Pleroma.Config.get(Oban)}
+ ]
children =
if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Gun do
[Pleroma.Application.GunSupervisor | children]
else
- children
+ [Pleroma.Applicaiton.HackneySupervisor | children]
end
cachex_children =
@@ -117,11 +115,4 @@ defmodule Mix.Pleroma do
def escape_sh_path(path) do
~S(') <> String.replace(path, ~S('), ~S(\')) <> ~S(')
end
-
- defp http_children(Tesla.Adapter.Gun) do
- Pleroma.Gun.ConnectionPool.children() ++
- [{Task, &Pleroma.HTTP.AdapterHelper.Gun.limiter_setup/0}]
- end
-
- defp http_children(_), do: []
end