channel-worker 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/command-poller.js +3 -1
- package/package.json +1 -1
package/lib/command-poller.js
CHANGED
|
@@ -1214,7 +1214,9 @@ class CommandPoller {
|
|
|
1214
1214
|
const stillOffline = renderers.filter(r => !runningRenderers.includes(r));
|
|
1215
1215
|
console.log(`[scene-dispatch] running=${runningRenderers.length}/${parallelLimit} offline=${stillOffline.length} queue=${queueCount} names=[${runningRenderers.map(r=>r.name)}]`);
|
|
1216
1216
|
|
|
1217
|
-
|
|
1217
|
+
// Only launch if queue has more work than running profiles can handle
|
|
1218
|
+
const freeSlots = Math.max(0, queueCount - runningRenderers.length);
|
|
1219
|
+
const neededLaunches = Math.min(parallelLimit - runningRenderers.length, stillOffline.length, freeSlots);
|
|
1218
1220
|
for (let li = 0; li < neededLaunches; li++) {
|
|
1219
1221
|
const toLaunch = stillOffline[li];
|
|
1220
1222
|
console.log(`[scene-dispatch] Launching ${toLaunch.name} (running: ${runningRenderers.length + li}/${parallelLimit})`);
|