From 908a4e0422a0c97da4efebc1c143cd546ee77735 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Fri, 25 Aug 2023 12:54:31 +1000 Subject: [PATCH] bot: Check for install every 5 seconds --- discord-bot/bot.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/discord-bot/bot.py b/discord-bot/bot.py index 3413083..0450dbc 100644 --- a/discord-bot/bot.py +++ b/discord-bot/bot.py @@ -71,14 +71,12 @@ async def createsite(ctx, domain: str, licence: str): json = r.json() if json['success'] == "true": await ctx.response.send_message(f"Site {domain} creating...\nI'll send you a message when it's ready") - # Set a timer to check if the site is ready - # Keep checking every 30 seconds until it is ready ready = False while ready == False: ready = await check_site_ready(domain) if ready == False: - await asyncio.sleep(30) + await asyncio.sleep(5) r = requests.get(f"http://{Master_IP}:{Master_Port}/site-info?domain={domain}") json = r.json()