root: fix redis passwords not being encoded correctly

closes #2130

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-01-26 20:45:45 +01:00
parent 01c80a82e2
commit c2586557d8
2 changed files with 11 additions and 3 deletions

View File

@ -26,6 +26,8 @@ def j_print(event: str, log_level: str = "info", **kwargs):
print(dumps(data), file=stderr)
j_print("Starting authentik bootstrap")
# Sanity check, ensure SECRET_KEY is set before we even check for database connectivity
if CONFIG.y("secret_key") is None or len(CONFIG.y("secret_key")) == 0:
j_print("----------------------------------------------------------------------")
@ -47,7 +49,9 @@ while True:
break
except OperationalError as exc:
sleep(1)
j_print(f"PostgreSQL Connection failed, retrying... ({exc})")
j_print(f"PostgreSQL connection failed, retrying... ({exc})")
finally:
j_print("PostgreSQL connection successful")
REDIS_PROTOCOL_PREFIX = "redis://"
if CONFIG.y_bool("redis.tls", False):
@ -65,3 +69,7 @@ while True:
except RedisError as exc:
sleep(1)
j_print(f"Redis Connection failed, retrying... ({exc})", redis_url=REDIS_URL)
finally:
j_print("Redis Connection successful")
j_print("Finished authentik bootstrap")