fix(main,reporter): handle SIGTERM gracefully and normalize history file path
This commit is contained in:
1 parent
9b53a4c491
commit
3c6c4e384b
2 files changed
+23
-6
No files matched your search
+5
-1
@@ -42,6 +42,10 @@ class LocalStateReporter:
|
||||
except Exception as e:
|
||||
logging.error(f"Reporter: Failed to write state file: {e}")
|
||||
|
||||
def get_history_file(self):
|
||||
base, _ = os.path.splitext(self.state_file)
|
||||
return f"{base}.history"
|
||||
|
||||
def log_heal_event(
|
||||
self,
|
||||
kernel_count,
|
||||
@@ -56,7 +60,7 @@ class LocalStateReporter:
|
||||
"""
|
||||
Records a specific healing event in a persistent history log.
|
||||
"""
|
||||
history_file = self.state_file.replace(".json", ".history")
|
||||
history_file = self.get_history_file()
|
||||
timestamp = datetime.now().isoformat()
|
||||
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user