feat(ui): add verbose worker log detail to processing history on file detail page

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-11 09:06:30 +00:00
parent f7799e409d
commit b18f5ee13c
10 changed files with 213 additions and 13 deletions
+10 -1
View File
@@ -2,9 +2,17 @@ from app.database import SessionLocal
from app.models import ProcessingLog
def log_task_progress(task_id, step_name, status, message=None, file_id=None):
def log_task_progress(task_id, step_name, status, message=None, file_id=None, detail=None):
"""
Logs the progress of a Celery task to the database.
Args:
task_id: The Celery task ID
step_name: Name of the processing step
status: Current status (pending, in_progress, success, failure)
message: Short summary message
file_id: Optional associated file record ID
detail: Optional verbose log output for diagnostics
"""
with SessionLocal() as db:
log_entry = ProcessingLog(
@@ -13,6 +21,7 @@ def log_task_progress(task_id, step_name, status, message=None, file_id=None):
status=status,
message=message,
file_id=file_id,
detail=detail,
)
db.add(log_entry)
db.commit()