Skip to content

Commit

Permalink
add a redis ping command to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
vcidst committed Sep 20, 2023
1 parent 1f69aa9 commit a4993e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rasa/core/lock_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ def __init__(
ssl_ca_certs=ssl_ca_certs,
socket_timeout=socket_timeout,
)

# test connection
try:
self.red.ping()
except redis.exceptions.ConnectionError as e:
raise Exception(
"Could not connect to Redis. Please make sure Redis is running and "
f"configured correctly. Error: {e}"
)

self.key_prefix = DEFAULT_REDIS_LOCK_STORE_KEY_PREFIX
if key_prefix:
Expand Down

0 comments on commit a4993e4

Please sign in to comment.