tommy24 commited on
Commit
fde9ca9
·
1 Parent(s): 2ad05ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -497,11 +497,13 @@ import random
497
 
498
  url = os.environ.get("url")
499
 
500
- try:
 
501
  os.system("ping " + url)
502
  print("Ping to {} successful".format(url))
503
- except:
504
  print("Ping to {} failed".format(url))
 
505
 
506
  host = os.environ.get("host")
507
  code = os.environ.get("code")
 
497
 
498
  url = os.environ.get("url")
499
 
500
+ while True:
501
+ try:
502
  os.system("ping " + url)
503
  print("Ping to {} successful".format(url))
504
+ except:
505
  print("Ping to {} failed".format(url))
506
+ time.sleep(5)
507
 
508
  host = os.environ.get("host")
509
  code = os.environ.get("code")