Each continuation batch of a multi-batch ZIM embed runs as a fresh BullMQ job, so handle() ran the hardcoded `safeUpdateProgress(job, 5)` even when the file was already 100k articles into a 600k-article ZIM. The UI gauge briefly dropped to 5% before the per-batch onProgress callback caught up to the true overall percentage, reading as a backward jump every time a new batch started. Compute initialPercent from batchOffset / totalArticles when available, falling back to 5 for single-batch files (uploaded PDFs, txts) where totalArticles isn't set. Capped at 99 to leave headroom for the 100% final-batch marker. Follow-up to PR #880 (which fixed the 0-100% scaling during a batch but still had the initial-frame regression). |
||
|---|---|---|
| .. | ||
| controllers | ||
| exceptions | ||
| jobs | ||
| middleware | ||
| models | ||
| services | ||
| utils | ||
| validators | ||