mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
The scheduler slept a fixed 30s after every pass, so each printer that freed up during a batch waited up to a full interval before its next job was dispatched — on a farm, that idle gap stacked into the "several long minutes" reporters saw between requesting prints and them starting (#2555). check_queue() now reports whether it dispatched anything; run() loops again after 3s on a productive pass and falls back to 30s otherwise. Fast ticks only continue while the queue is actively draining, so this can't tight-loop: a pass that dispatches nothing (all pending items behind busy printers, or a wedged head-of-line job holding its printer) reverts to the normal interval.