mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 10:32:57 +01:00
Scan job discovery only looked at the high priority queue and only recognised scan_platforms, so two kinds of in-flight scan went unseen. Watcher scans are delayed through the scheduler and land in the low priority queue, so the concurrency guard let a manual scan start alongside one and the stop handler left it queued to run afterwards. The scheduled rescan enqueues its own task and calls scan_platforms in process, so the worker reports the task's name. That made stopping it a silent no-op: with no running job matched, the stop flag it polls was never set. Discovery now spans both queues plus the scheduler and matches either function name. The scheduler registry also holds the standing cron entry for the scheduled rescan, which is a schedule rather than a pending scan, so only delayed scan_platforms jobs count as queued. Clearing the stop flag at scan start is now scoped to the scan that owns it, so a scan starting next to one that has not yet polled the flag cannot drop a stop request meant for it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>