channel-worker 2.1.2 → 2.1.3

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/api-client.js CHANGED
@@ -90,6 +90,10 @@ class ApiClient {
90
90
  return this.request('GET', `/workers/renderer-has-commands?nst_profile_id=${encodeURIComponent(nstProfileId)}`);
91
91
  }
92
92
 
93
+ async resetRendererCommands(nstProfileId) {
94
+ return this.request('POST', '/workers/reset-renderer-commands', { nst_profile_id: nstProfileId });
95
+ }
96
+
93
97
  // Extension download
94
98
  async getExtensionVersion() {
95
99
  const data = await this.request('GET', '/extension-download/version');
@@ -1165,9 +1165,11 @@ class CommandPoller {
1165
1165
  if (cmdCount > 0) {
1166
1166
  console.log(`[scene-dispatch] Crash recovery: ${r.name} has ${cmdCount} commands but not running — relaunching`);
1167
1167
  try {
1168
+ // Reset stuck "running" commands back to "pending" so extension can pick them up
1169
+ await this.api.resetRendererCommands(r.nst_profile_id);
1168
1170
  await this._launchRendererProfile(r);
1169
1171
  runningRenderers.push(r);
1170
- console.log(`[scene-dispatch] ${r.name} recovered`);
1172
+ console.log(`[scene-dispatch] ${r.name} recovered (${cmdCount} commands reset)`);
1171
1173
  } catch (err) {
1172
1174
  console.error(`[scene-dispatch] Failed to recover ${r.name}: ${err.message}`);
1173
1175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "channel-worker",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
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": {