0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

fix(utils/bec_dispatcher): try/except to start client, to avoid crash when redis is not running

This commit is contained in:
wyzula-jan
2024-03-20 12:06:22 +01:00
parent 86416d50cb
commit 9ccd4ea235

View File

@ -38,7 +38,10 @@ class _BECDispatcher(QObject):
def __init__(self, client=None):
super().__init__()
self.client = BECClient() if client is None else client
self.client.start()
try:
self.client.start()
except redis.exceptions.ConnectionError:
print("Could not connect to Redis, skipping start of BECClient.")
self._connections = {}