diff --git a/vetting_bot/main.py b/vetting_bot/main.py index 4d63053..018d4c5 100644 --- a/vetting_bot/main.py +++ b/vetting_bot/main.py @@ -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...")