summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-01-20 18:14:27 -0500
committerMark Felder <feld@feld.me>2024-01-20 18:41:04 -0500
commit029aaf3d744184737666b1e553ed92d7708f1fee (patch)
tree14b3f106eaadc643f05721a2f074389163859e13 /lib
parent65ac5137768d90ee9d2667e68181037e5d5642d3 (diff)
downloadpleroma-029aaf3d744184737666b1e553ed92d7708f1fee.tar.gz
pleroma-029aaf3d744184737666b1e553ed92d7708f1fee.zip
Use config to control max_restarts
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/application.ex7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex
index 8fa6f3fae..a01a13b18 100644
--- a/lib/pleroma/application.ex
+++ b/lib/pleroma/application.ex
@@ -116,12 +116,7 @@ defmodule Pleroma.Application do
# If we have a lot of caches, default max_restarts can cause test
# resets to fail.
# Go for the default 3 unless we're in test
- max_restarts =
- if @mix_env == :test do
- 100
- else
- 3
- end
+ max_restarts = Application.get_env(:pleroma, __MODULE__)[:max_restarts]
opts = [strategy: :one_for_one, name: Pleroma.Supervisor, max_restarts: max_restarts]
result = Supervisor.start_link(children, opts)