set max runtime to 30min

This commit is contained in:
Jan-Ole Hübner 2024-02-13 11:38:00 +01:00 committed by GitHub
parent c09826c4f9
commit 1456c12608
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,7 +60,7 @@ async def run():
home = tibber_connection.get_homes()[0] home = tibber_connection.get_homes()[0]
await home.rt_subscribe(_incoming) await home.rt_subscribe(_incoming)
timeout = time.time() + 3600 # Set a timeout for 3600 seconds (1 hour) timeout = time.time() + 1800 # Set a timeout for 3600 seconds (1 hour)
while time.time() < timeout: while time.time() < timeout:
await asyncio.sleep(2) await asyncio.sleep(2)