Skip to content

Commit d3a9cf2

Browse files
authored
Merge pull request #214 from openzim/ignore_delete
Ignore ZIMs marked for deletion
2 parents acaa022 + 8feea5d commit d3a9cf2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

backend/maint-scripts/populate_cms_database.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,10 @@ def process_zim_file(
374374
# Calculate relative path within warehouse
375375
zim_path_in_warehouse = zim_file.relative_to(warehouse_path)
376376

377+
if zim_file.with_suffix(".delete").exists():
378+
logger.info(f"Ignoring ZIM marked for deletion: {zim_path_in_warehouse}")
379+
return
380+
377381
logger.info(f"Processing: {zim_path_in_warehouse}")
378382

379383
# Check if book already exists at this location

0 commit comments

Comments
 (0)