mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 02:35:14 +00:00
Flush Redis DB on startup.
This commit is contained in:
parent
755d6c7865
commit
f71e1aadd4
1 changed files with 1 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ def wait_for_redis(host='localhost', port=6379, db=0, max_retries=30, retry_inte
|
||||||
socket_connect_timeout=2
|
socket_connect_timeout=2
|
||||||
)
|
)
|
||||||
redis_client.ping()
|
redis_client.ping()
|
||||||
|
redis_client.flushdb() # Flush the database to ensure it's clean
|
||||||
logger.info(f"✅ Redis at {host}:{port}/{db} is now available!")
|
logger.info(f"✅ Redis at {host}:{port}/{db} is now available!")
|
||||||
return True
|
return True
|
||||||
except (redis.exceptions.ConnectionError, redis.exceptions.TimeoutError) as e:
|
except (redis.exceptions.ConnectionError, redis.exceptions.TimeoutError) as e:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue