diff --git a/oci-arm-monitor.py b/oci-arm-monitor.py index a974faf..4f0f548 100644 --- a/oci-arm-monitor.py +++ b/oci-arm-monitor.py @@ -69,6 +69,9 @@ while True: print(f"Unexpected error: {e.message}", flush=True) send_email("OCI ARM Monitor Error", str(e.message)) sys.exit(1) + except Exception as e: + attempts += 1 + print(f"{time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(time.time() + 8*3600))} {e}. Retrying in {INTERVAL}s...", flush=True) now = time.time() if now - last_report >= WEEKLY_REPORT_INTERVAL: uptime_days = int((now - start_time) / 86400)