From afccf6e02212f0bddbb42c537c0dc390368e0c28 Mon Sep 17 00:00:00 2001 From: pyob-bot Date: Wed, 18 Mar 2026 00:22:39 +0000 Subject: [PATCH] Refactor: Add Lock for Thread-Safe Status Writing --- src/pyob/dashboard_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyob/dashboard_server.py b/src/pyob/dashboard_server.py index 31bf959..a016810 100644 --- a/src/pyob/dashboard_server.py +++ b/src/pyob/dashboard_server.py @@ -74,7 +74,8 @@ def acknowledge_issue(issue_id): "timestamp": datetime.now().isoformat(), } - # Save updated statuses + # Save updated statuses + with status_lock: # Acquire lock before writing shared resource with open(status_file, "w", encoding="utf-8") as f: json.dump(issue_statuses, f, indent=4)