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)
|
||||
|
||||
async def start_timer_with_delay():
|
||||
await asyncio.sleep(5)
|
||||
await timer.start_all_timers()
|
||||
logger.debug("Doing init sync")
|
||||
await client.sync(timeout=0, full_state=True)
|
||||
|
||||
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):
|
||||
logger.warning("Unable to connect to homeserver, retrying in 15s...")
|
||||
|
|
Loading…
Reference in New Issue