update sleep times; remove line causing secondary error

This commit is contained in:
Mark Eaton
2025-12-06 15:52:54 -05:00
parent a93a8b5fc8
commit 8afa2fde40
+4 -4
View File
@@ -12,15 +12,15 @@ load_dotenv()
def auth(): def auth():
# Wait for internet connectivity before proceeding # Wait for internet connectivity before proceeding
sleep(180)
while True: while True:
try: try:
test = httpx.get("https://www.google.com", timeout=5.0) test = httpx.get("https://www.google.com", timeout=5.0)
if 200 <= test.status_code < 400: if 200 <= test.status_code < 400:
break break
except: except httpcore.ConnectError:
print(test.status_code) print("Internet not available; retrying in 600 seconds...")
print("Internet not available; retrying in 180 seconds...") sleep(600)
sleep(180)
data = { data = {
"client_id": os.environ["CLIENT_ID"], "client_id": os.environ["CLIENT_ID"],
"client_secret": os.environ["CLIENT_SECRET"], "client_secret": os.environ["CLIENT_SECRET"],