bot: Check for install every 5 seconds
All checks were successful
Build Docker / Build Master (push) Successful in 22s
Build Docker / Build Bot (push) Successful in 26s

This commit is contained in:
2023-08-25 12:54:31 +10:00
parent d217309e74
commit 908a4e0422

View File

@@ -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()