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():
# Wait for internet connectivity before proceeding
sleep(180)
while True:
try:
test = httpx.get("https://www.google.com", timeout=5.0)
if 200 <= test.status_code < 400:
break
except:
print(test.status_code)
print("Internet not available; retrying in 180 seconds...")
sleep(180)
except httpcore.ConnectError:
print("Internet not available; retrying in 600 seconds...")
sleep(600)
data = {
"client_id": os.environ["CLIENT_ID"],
"client_secret": os.environ["CLIENT_SECRET"],