code optimizations

This commit is contained in:
2024-12-12 22:19:47 +01:00
parent 7e36084b0f
commit c638a0ddd6
8 changed files with 24 additions and 7 deletions
+2 -1
View File
@@ -32,5 +32,6 @@ class TriggerScheduler(AppClass):
try:
while True:
await asyncio.sleep(1) # Keep the main function alive
except KeyboardInterrupt:
except asyncio.exceptions.CancelledError:
self.log.info("Exiting, stopping all triggers")
await self.stop_triggers()