config: print redis exception on failed connection

It's always useful to know *why* the connection failed.

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-03-26 22:47:22 +01:00
parent a72be27982
commit b59b0c248b
No known key found for this signature in database
GPG Key ID: 73D5E7FDEE3DE49A
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@ class AppConfig:
return config
except Exception: # pylint: disable=broad-except
print(f"... Redis connection failed, retry [{i}/10]")
except Exception as e: # pylint: disable=broad-except
print(f"... Redis connection failed, retry [{i}/10]: {e}")
sleep(3)
raise ConnectionError("failed to connect to redis")