From 8feea5d8003c88cf7d65b0b14dff98f59d023de9 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Tue, 17 Mar 2026 12:57:57 +0000 Subject: [PATCH] Ignore ZIMs marked for deletion --- backend/maint-scripts/populate_cms_database.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/maint-scripts/populate_cms_database.py b/backend/maint-scripts/populate_cms_database.py index 7db88ca..852318d 100755 --- a/backend/maint-scripts/populate_cms_database.py +++ b/backend/maint-scripts/populate_cms_database.py @@ -374,6 +374,10 @@ def process_zim_file( # Calculate relative path within warehouse zim_path_in_warehouse = zim_file.relative_to(warehouse_path) + if zim_file.with_suffix(".delete").exists(): + logger.info(f"Ignoring ZIM marked for deletion: {zim_path_in_warehouse}") + return + logger.info(f"Processing: {zim_path_in_warehouse}") # Check if book already exists at this location