Skip to content

Commit

Permalink
Merge pull request #1045 from openzim/fail_tasks_with_no_files
Browse files Browse the repository at this point in the history
Mark task with no files created as failed
  • Loading branch information
benoit74 authored Nov 8, 2024
2 parents 554aae2 + 6032290 commit c0eb265
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion workers/app/task/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,4 +782,8 @@ def run(self):
self.check_scraper_artifacts_upload()

# done with processing, cleaning-up and exiting
self.shutdown("succeeded" if self.scraper_succeeded else "failed")
self.shutdown(
"succeeded"
if (self.scraper_succeeded and len(self.zim_files) > 0)
else "failed"
)

0 comments on commit c0eb265

Please sign in to comment.