feat&fix: enhance task status handling and update logging configuration

This commit is contained in:
adlsdztony
2025-06-05 09:33:36 +00:00
parent 2bfb4af8b5
commit 3b1540ed23
6 changed files with 17 additions and 31 deletions

View File

@@ -122,6 +122,8 @@ def get_task_status(task_type, task_id):
status = "Error"
elif log_data.get("exit_condition") and "message_exit: True" in log_data.get("exit_condition", ""):
status = "Done (Message Exit)"
elif log_data.get("exit_condition") and "thought_exit: True" in log_data.get("exit_condition", ""):
status = "Done (Thought Exit)"
elif len(steps) >= MAX_STEPS:
status = "Done (Max Steps)"
else:
@@ -231,6 +233,8 @@ def get_task_status_brief(task_type, task_id):
log_tail = result.stdout
if "message_exit: True" in log_tail:
status = "Done (Message Exit)"
elif "thought_exit: True" in log_tail:
status = "Done (Thought Exit)"
except:
pass