Run timers after init sync
This commit is contained in:
parent
fee9a2bb16
commit
912169657a
|
@ -113,13 +113,13 @@ async def main():
|
||||||
|
|
||||||
timer = Timer(client, store, config)
|
timer = Timer(client, store, config)
|
||||||
|
|
||||||
async def start_timer_with_delay():
|
logger.debug("Doing init sync")
|
||||||
await asyncio.sleep(5)
|
await client.sync(timeout=0, full_state=True)
|
||||||
await timer.start_all_timers()
|
|
||||||
|
|
||||||
asyncio.create_task(start_timer_with_delay())
|
await timer.start_all_timers()
|
||||||
|
|
||||||
await client.sync_forever(timeout=30000, full_state=True)
|
logger.debug("Continuing with sync_forever")
|
||||||
|
await client.sync_forever(timeout=30000, full_state=False)
|
||||||
|
|
||||||
except (ClientConnectionError, ServerDisconnectedError):
|
except (ClientConnectionError, ServerDisconnectedError):
|
||||||
logger.warning("Unable to connect to homeserver, retrying in 15s...")
|
logger.warning("Unable to connect to homeserver, retrying in 15s...")
|
||||||
|
|
Loading…
Reference in New Issue