fix: make log_task_progress resilient to DB errors and fix test assertions

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-17 11:40:34 +00:00
parent 6c7f36cb3c
commit 13a3c41482
3 changed files with 58 additions and 50 deletions
+1 -1
View File
@@ -921,7 +921,7 @@ class TestBulkReprocessExceptions:
db_session.commit()
# Cause an exception during task queuing
with patch("app.tasks.process_document.process_document") as mock_task:
with patch("app.api.files.process_document") as mock_task:
mock_task.delay.side_effect = Exception("Task queue error")
response = client.post("/api/files/bulk-reprocess", json=[file.id])
assert response.status_code == 200 # Errors are collected in response