Queue server calculations beyond PLANNING_WORKERS #323
Notifications
Due Date
No due date set.
Depends on
#320 Calculate plans on the server over a WebSocket
nessar/vac-optimizer
Reference: nessar/vac-optimizer#323
Reference in new issue
Block a user
Parent
#319
What to build
When the server is busy, a new calculation waits its turn instead of slowing every running calculation down. At most
PLANNING_WORKERScalculations run at once. Others wait in FIFO order, and the server sends a heartbeat every second while they wait, so the client's 30-second liveness timer does not expire. Cancel, or closing the socket, removes a waiting calculation. A running slot is freed by the job's terminal message, or by the socket closing, whichever comes first. A client that keeps an idle socket open therefore does not hold a core. No queue position is shown.If
PLANNING_WORKERSis unset, it defaults to half ofnavigator.hardwareConcurrency. Mark this with ashortcut:comment: the default assumes two threads per core, and throughput was measured to stop growing at physical cores. The production Compose file drops the one-CPU and 512 MB limits, caps memory at 8 GB and exposesPLANNING_WORKERS.Acceptance criteria
PLANNING_WORKERS=1, a second calculation waits, receives heartbeats, and starts when the first finishes; three or more start in arrival order.PLANNING_WORKERS.Blocked by