Skip to content

fix: make bulk Scan now obey the scan window and manual pause - #253

Merged
nazmolla merged 1 commit into
mainfrom
fix/scan-window-bulk-force
Dec 5, 2026
Merged

nazmolla merged 1 commit into
mainfrom
fix/scan-window-bulk-force

Conversation

@nazmolla

@nazmolla nazmolla commented Dec 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bulk Scan now (several titles, a show, a library) now jumps the queue but waits for the scan window and stops when it ends; a single title's Scan now still runs at once (FORCE_QUEUED vs FORCE_NOW in database.py).
  • POST /api/scan/pause sets a persisted manual pause (optional {"until": "HH:MM"}) that stops every scan, forced ones included, survives restarts and lifts itself; GET /api/scan/queue reports manual_pause and paused_until.
  • Forced jobs re-queued by the window end or the pause keep their place at the front.
  • Also: the relabel dialog lists exposed labels before covered ones in the Minimal tier.

Closes #252

Test plan

  • pytest tests/ — 1248 passed, with new regression tests for the window, the pause and the force levels
  • vitest — 236 passed
  • Dev instance: smoke test passed, pause until 01:00 held across a restart
  • Deployed to prod (PID 78156), log clean, scanning paused until 01:00

🤖 Generated with Claude Code

A bulk Scan now force-scanned every title, and forced scans ignored
both the scan window and Pause (the next claim resumed the scanner),
so a 234-title batch ran on for hours after the window closed.

force_scan now has two levels: FORCE_NOW (one title) may still run
outside the window; FORCE_QUEUED (several titles, a show, a library)
jumps the queue but waits for the window and stops when it ends.
POST /api/scan/pause sets a persisted pause, optionally until a local
HH:MM, that stops every scan including forced ones and lifts itself.

Closes #252

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nazmolla
nazmolla force-pushed the fix/scan-window-bulk-force branch from b939f50 to dda4e9f Compare December 5, 2026 00:44
@nazmolla
nazmolla merged commit c7e56a5 into main Dec 5, 2026
@nazmolla
nazmolla deleted the fix/scan-window-bulk-force branch December 5, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make bulk Scan now obey the scan window and pause in scanner

1 participant