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:
@ -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 = {}
|
||||
|
||||
|
Reference in New Issue
Block a user