Retry on non-ServiceError exceptions in ARM monitor
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user