Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Lucas Oliveira
dda99d23af remove adding to failed tasks to fix failed tasks count 2025-12-12 10:45:41 -03:00

View file

@ -257,9 +257,13 @@ class TaskService:
import traceback import traceback
traceback.print_exc() traceback.print_exc()
file_task.status = TaskStatus.FAILED # Note: Processors already handle incrementing failed_files and
file_task.error = str(e) # setting file_task status/error, so we don't duplicate that here.
upload_task.failed_files += 1 # Only update timestamp if processor didn't already set it
if file_task.status == TaskStatus.RUNNING:
file_task.status = TaskStatus.FAILED
if not file_task.error:
file_task.error = str(e)
finally: finally:
file_task.updated_at = time.time() file_task.updated_at = time.time()
upload_task.processed_files += 1 upload_task.processed_files += 1