@nsshunt/ststestrunner 1.0.40 → 1.0.41

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.
@@ -20174,12 +20174,19 @@ class ServiceInstance extends tinyEmitterExports.TinyEmitter {
20174
20174
  });
20175
20175
  __publicField(this, "Stop", async () => {
20176
20176
  __privateGet(this, _EmitEvent).call(this, "Stopping", {});
20177
+ __privateGet(this, _debug5).call(this, chalk$1.magenta(`Stop(): Stopping Service.`));
20178
+ const workers = await __privateGet(this, _wm).GetWorkersSmall([]);
20179
+ __privateGet(this, _debug5).call(this, `Stop(): Workers to terminated: [${JSON.stringify(workers, null, 2)}]`);
20180
+ const workersTerminated = await __privateGet(this, _wm).TerminateWorkers(Object.values(workers).map((worker) => worker.id));
20181
+ __privateGet(this, _debug5).call(this, `Stop(): Workers terminated: [${JSON.stringify(workersTerminated, null, 2)}]`);
20177
20182
  if (this.socket) {
20178
- __privateGet(this, _debug5).call(this, chalk$1.magenta(`Stopping Service.`));
20183
+ __privateGet(this, _debug5).call(this, `Stop(): Going to disconnect socket.`);
20179
20184
  this.socket.disconnect();
20180
- await Sleep(500);
20181
- __privateGet(this, _debug5).call(this, chalk$1.magenta(`Service Stopped.`));
20185
+ __privateGet(this, _debug5).call(this, `Stop(): Socket disconnected.`);
20182
20186
  }
20187
+ __privateGet(this, _debug5).call(this, `Stop(): Sleeping (500ms) ...`);
20188
+ await Sleep(500);
20189
+ __privateGet(this, _debug5).call(this, chalk$1.magenta(`Stop(): Service Stopped.`));
20183
20190
  __privateGet(this, _EmitEvent).call(this, "Stopped", {});
20184
20191
  });
20185
20192
  // d.workers = JSON.parse(strFromU8(decompressSync(d.workers as any)));