Skip to content

Commit

Permalink
add another try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNeugebauer committed Aug 30, 2024
1 parent 5aa1363 commit 1f00af5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion learning_loop_node/detector/detector_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@ async def sync_status_with_learning_loop(self) -> None:

async def set_operation_mode(self, mode: OperationMode):
self.operation_mode = mode
await self.sync_status_with_learning_loop()
try:
await self.sync_status_with_learning_loop()
except Exception as e:
self.log.warning(f'Operation mode set to {mode}, but sync failed: {e}')

def reload(self, reason: str):
'''provide a cause for the reload'''
Expand Down

0 comments on commit 1f00af5

Please sign in to comment.