mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 09:07:18 +01:00
Merge pull request #1016 from paperless-ngx/more-redis-wait-info
Feature: Include error information when Redis connection fails
This commit is contained in:
commit
f7539eb931
1 changed files with 4 additions and 2 deletions
|
|
@ -26,9 +26,11 @@ if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
client.ping()
|
client.ping()
|
||||||
break
|
break
|
||||||
except Exception:
|
except Exception as e:
|
||||||
print(
|
print(
|
||||||
f"Redis ping #{attempt} failed, waiting {RETRY_SLEEP_SECONDS}s",
|
f"Redis ping #{attempt} failed.\n"
|
||||||
|
f"Error: {str(e)}.\n"
|
||||||
|
f"Waiting {RETRY_SLEEP_SECONDS}s",
|
||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
time.sleep(RETRY_SLEEP_SECONDS)
|
time.sleep(RETRY_SLEEP_SECONDS)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue