set max runtime to 30min
This commit is contained in:
parent
c09826c4f9
commit
1456c12608
1 changed files with 2 additions and 2 deletions
4
pulse.py
4
pulse.py
|
@ -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)
|
||||||
|
|
||||||
|
@ -69,4 +69,4 @@ async def run():
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
loop.run_until_complete(run())
|
loop.run_until_complete(run())
|
||||||
exit(42)
|
exit(42)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue