mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-03 03:28:10 +00:00
Cleaning up start.py
This commit is contained in:
@@ -9,12 +9,16 @@ 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(100), wait=tenacity.wait_random(min=2, max=5))
|
||||
def resolve():
|
||||
os.environ["FRONT_ADDRESS"] = socket.gethostbyname(os.environ.get("FRONT_ADDRESS", "front"))
|
||||
#@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"))
|
||||
|
||||
# Actual startup script
|
||||
resolve()
|
||||
#resolve()
|
||||
resolve = retry(socket.gethostbyname, stop=tenacity.stop_after_attempt(100), wait=tenacity.wait_random(min=2, max=5))
|
||||
|
||||
os.environ["FRONT_ADDRESS"] = resolve(os.environ.get("FRONT_ADDRESS", "front"))
|
||||
|
||||
if "HOST_REDIS" not in os.environ: os.environ["HOST_REDIS"] = "redis"
|
||||
|
||||
for rspamd_file in glob.glob("/conf/*"):
|
||||
|
||||
Reference in New Issue
Block a user