aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/gun
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/gun')
-rw-r--r--lib/pleroma/gun/gun_supervisor.ex19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/pleroma/gun/gun_supervisor.ex b/lib/pleroma/gun/gun_supervisor.ex
new file mode 100644
index 000000000..c72dfdd24
--- /dev/null
+++ b/lib/pleroma/gun/gun_supervisor.ex
@@ -0,0 +1,19 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Gun.GunSupervisor do
+ use Supervisor
+
+ def start_link(_) do
+ Supervisor.start_link(__MODULE__, :no_args)
+ end
+
+ def init(_) do
+ children =
+ Pleroma.Gun.ConnectionPool.children() ++
+ [{Task, &Pleroma.HTTP.AdapterHelper.Gun.limiter_setup/0}]
+
+ Supervisor.init(children, strategy: :one_for_one)
+ end
+end