Fix progress regex and SIGHUP/scan_zims race condition

- Parse Browsertrix "crawled":N JSON format instead of "N pages"
- Add 3s delay between SIGHUP to kiwix-serve and scan_zims() call
  so the OPDS catalog is reloaded before we query it for linking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-04-19 19:35:42 +00:00
commit 5f5bcedab9

View file

@ -339,6 +339,9 @@ def _process_job(job, config, stop_event):
except Exception as e:
logger.warning(f"Job {job_id}: failed to signal kiwix-serve: {e}")
# Wait for kiwix-serve to reload its catalog after SIGHUP
time.sleep(3)
zim_source_id = None
try:
from .zim_monitor import scan_zims