bot: Check for install every 5 seconds
This commit is contained in:
parent
d217309e74
commit
908a4e0422
@ -71,14 +71,12 @@ async def createsite(ctx, domain: str, licence: str):
|
|||||||
json = r.json()
|
json = r.json()
|
||||||
if json['success'] == "true":
|
if json['success'] == "true":
|
||||||
await ctx.response.send_message(f"Site {domain} creating...\nI'll send you a message when it's ready")
|
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
|
ready = False
|
||||||
while ready == False:
|
while ready == False:
|
||||||
ready = await check_site_ready(domain)
|
ready = await check_site_ready(domain)
|
||||||
if ready == False:
|
if ready == False:
|
||||||
await asyncio.sleep(30)
|
await asyncio.sleep(5)
|
||||||
|
|
||||||
r = requests.get(f"http://{Master_IP}:{Master_Port}/site-info?domain={domain}")
|
r = requests.get(f"http://{Master_IP}:{Master_Port}/site-info?domain={domain}")
|
||||||
json = r.json()
|
json = r.json()
|
||||||
|
Loading…
Reference in New Issue
Block a user