lifecycle: show errors when initial db check fails

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-05 20:15:01 +02:00
parent 553872e8dd
commit ca5761652c
1 changed files with 4 additions and 4 deletions

View File

@ -35,9 +35,9 @@ while True:
) )
conn.cursor() conn.cursor()
break break
except OperationalError: except OperationalError as exc:
sleep(1) sleep(1)
j_print("PostgreSQL Connection failed, retrying...") j_print(f"PostgreSQL Connection failed, retrying... ({exc})")
while True: while True:
try: try:
@ -49,6 +49,6 @@ while True:
) )
redis.ping() redis.ping()
break break
except RedisError: except RedisError as exc:
sleep(1) sleep(1)
j_print("Redis Connection failed, retrying...") j_print(f"Redis Connection failed, retrying... ({exc})")