update sleep times; remove line causing secondary error
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user