feat&fix: enhance task status handling and update logging configuration
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user