sleeptime const
This commit is contained in:
parent
ea511a6d67
commit
32d9b4d658
|
@ -4,6 +4,7 @@ from time import sleep
|
||||||
|
|
||||||
TIMEOUT: float = 1
|
TIMEOUT: float = 1
|
||||||
TESTDOMAINS: list[str] = ["cscherr.de", "debian.org", "cloudflare.com"]
|
TESTDOMAINS: list[str] = ["cscherr.de", "debian.org", "cloudflare.com"]
|
||||||
|
SLEEPTIME: int = 600 # 10 minutes
|
||||||
|
|
||||||
def check_net() -> bool:
|
def check_net() -> bool:
|
||||||
statuses: list[bool] = []
|
statuses: list[bool] = []
|
||||||
|
@ -33,7 +34,7 @@ def monitor():
|
||||||
b = check_net()
|
b = check_net()
|
||||||
if b: print(":SUCCESS:")
|
if b: print(":SUCCESS:")
|
||||||
else: print(":FAILURE:")
|
else: print(":FAILURE:")
|
||||||
sleep(4)
|
sleep(SLEEPTIME)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue