channel-worker 2.5.39 → 2.5.40

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.
@@ -1456,12 +1456,16 @@ class CommandPoller {
1456
1456
  let parallelLimit = 2; // sane default if /workers/me fails or is
1457
1457
  // unavailable on an older API; effective limit
1458
1458
  // is still bounded by server-side enforcement.
1459
+ let independentAccounts = false; // when true: renderers are SEPARATE Flow
1460
+ // accounts → run all concurrently, skip the
1461
+ // shared-account round-robin close-idle rotation.
1459
1462
  try {
1460
1463
  if (this.api.getMyWorker) {
1461
1464
  const me = await this.api.getMyWorker();
1462
1465
  if (me && typeof me.parallel_limit === 'number') {
1463
1466
  parallelLimit = Math.max(0, me.parallel_limit);
1464
1467
  }
1468
+ if (me && me.independent_accounts) independentAccounts = true;
1465
1469
  }
1466
1470
  } catch (e) {
1467
1471
  if (this.config.verbose) console.warn('[scene-dispatch] getMyWorker failed, using default:', e.message);
@@ -1483,7 +1487,10 @@ class CommandPoller {
1483
1487
  // browser idle on Flow page keeps refreshing tokens / pinging
1484
1488
  // telemetry → Veo flags "2 concurrent sessions per account" → captcha.
1485
1489
  // Closing it = 0 idle sessions, only 1 active at a time.
1486
- if (queueCount > 0 && stillOffline.length > 0 && runningRenderers.length > 0) {
1490
+ // Round-robin close-idle is a SHARED-ACCOUNT safety (keep ≤1 Flow session
1491
+ // live per Google account). With independent_accounts every renderer is
1492
+ // its own account → skip it entirely and let them all run concurrently.
1493
+ if (!independentAccounts && queueCount > 0 && stillOffline.length > 0 && runningRenderers.length > 0) {
1487
1494
  const stoppedNames = [];
1488
1495
  for (const r of [...runningRenderers]) {
1489
1496
  // Skip externally-launched profiles (user opened manually via NST UI)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "2.5.39",
3
+ "version": "2.5.40",
4
4
  "description": "Channel Manager worker daemon — runs on remote machines to execute video pipeline jobs",
5
5
  "main": "lib/daemon.js",
6
6
  "bin": {