From 57cd1e3b6e2127cf023fc21cf49a8c4717716152 Mon Sep 17 00:00:00 2001 From: Mark Eaton Date: Fri, 20 Feb 2026 20:11:11 -0500 Subject: [PATCH] network connectivity check moved to .service file; deleted here --- main.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/main.py b/main.py index 880ebc2..61cd9c5 100644 --- a/main.py +++ b/main.py @@ -11,16 +11,6 @@ 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 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"], @@ -64,7 +54,7 @@ def main(token): 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()