network connectivity check moved to .service file; deleted here

This commit is contained in:
Mark Eaton
2026-02-20 20:11:11 -05:00
parent 8bcbe4f4df
commit 57cd1e3b6e
+1 -11
View File
@@ -11,16 +11,6 @@ load_dotenv()
def auth(): 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 httpcore.ConnectError:
print("Internet not available; retrying in 600 seconds...")
sleep(600)
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"],
@@ -64,7 +54,7 @@ def main(token):
def send(card): def send(card):
resp = httpx.post(os.environ["TEAMS_URL"], json=card) resp = httpx.post(os.environ["TEAMS_URL"], json=card, timeout=None)
resp.raise_for_status() resp.raise_for_status()