From 081762986990bd26ddf7d2cd891e60c57e6ec50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20M=C3=B6hlmann?= Date: Sun, 7 Oct 2018 02:10:13 +0300 Subject: [PATCH] Increase attempts as it failed on fresh Swarm host --- core/dovecot/start.py | 2 +- core/postfix/start.py | 2 +- services/rspamd/start.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/dovecot/start.py b/core/dovecot/start.py index 40e1edf0..0aa7a365 100755 --- a/core/dovecot/start.py +++ b/core/dovecot/start.py @@ -9,7 +9,7 @@ from tenacity import retry convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ)) -@retry(stop=tenacity.stop_after_attempt(10), wait=tenacity.wait_random(min=2, max=5)) +@retry(stop=tenacity.stop_after_attempt(100), wait=tenacity.wait_random(min=2, max=5)) def resolve(): os.environ["FRONT_ADDRESS"] = socket.gethostbyname(os.environ.get("FRONT_ADDRESS", "front")) os.environ["REDIS_ADDRESS"] = socket.gethostbyname(os.environ.get("REDIS_ADDRESS", "redis")) diff --git a/core/postfix/start.py b/core/postfix/start.py index bfa13da2..e3c13110 100755 --- a/core/postfix/start.py +++ b/core/postfix/start.py @@ -10,7 +10,7 @@ from tenacity import retry convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ)) -@retry(stop=tenacity.stop_after_attempt(10), wait=tenacity.wait_random(min=2, max=5)) +@retry(stop=tenacity.stop_after_attempt(100), wait=tenacity.wait_random(min=2, max=5)) def resolve(): os.environ["FRONT_ADDRESS"] = socket.gethostbyname(os.environ.get("FRONT_ADDRESS", "front")) diff --git a/services/rspamd/start.py b/services/rspamd/start.py index 3ef309b2..b979517e 100755 --- a/services/rspamd/start.py +++ b/services/rspamd/start.py @@ -9,7 +9,7 @@ from tenacity import retry convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ)) -@retry(stop=tenacity.stop_after_attempt(10), wait=tenacity.wait_random(min=2, max=5)) +@retry(stop=tenacity.stop_after_attempt(100), wait=tenacity.wait_random(min=2, max=5)) def resolve(): os.environ["FRONT_ADDRESS"] = socket.gethostbyname(os.environ.get("FRONT_ADDRESS", "front"))