From 243756671205b29bd476ae5b96ae75eb23e69eae Mon Sep 17 00:00:00 2001 From: dsutanto Date: Mon, 3 Aug 2026 15:33:21 +0700 Subject: [PATCH] Still Error --- recounting_dashboard.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/recounting_dashboard.py b/recounting_dashboard.py index d282b9d..b545379 100644 --- a/recounting_dashboard.py +++ b/recounting_dashboard.py @@ -155,10 +155,15 @@ def start_recount(): _stop_ffmpeg_locked() try: - _http_session.post(f"{RECOUNT_API_URL}/api/reset", timeout=5) + resp = _http_session.post(f"{RECOUNT_API_URL}/api/reset", timeout=5) + print(f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Recount reset: {RECOUNT_API_URL}/api/reset → {resp.status_code}") time.sleep(1) - except Exception: - pass + except requests.exceptions.Timeout: + print(f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Recount reset: {RECOUNT_API_URL}/api/reset → timeout") + except requests.exceptions.ConnectionError as e: + print(f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Recount reset: {RECOUNT_API_URL}/api/reset → unreachable: {e}") + except Exception as e: + print(f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] Recount reset: {RECOUNT_API_URL}/api/reset → error: {e}") with _streaming_lock: _current_file = mp4_path