@nsshunt/stsrunnerframework 1.0.85 → 1.0.87
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.
|
@@ -1919,9 +1919,11 @@ class WorkerInstance {
|
|
|
1919
1919
|
var _a;
|
|
1920
1920
|
try {
|
|
1921
1921
|
const runnerId = testRunnerTelemetryPayload.runner.id;
|
|
1922
|
-
__privateGet(this,
|
|
1923
|
-
|
|
1924
|
-
__privateGet(this,
|
|
1922
|
+
const currentIteration = __privateGet(this, _GetRunnerIterationById).call(this, runnerId);
|
|
1923
|
+
__privateGet(this, _debug).call(this, `${chalk.magenta(`runner: [${runnerId}]`)} ExecuteRunner(${currentIteration})`);
|
|
1924
|
+
await ((_a = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _a.Execute(currentIteration));
|
|
1925
|
+
const newIteration = __privateGet(this, _IncRunnerIterationById).call(this, runnerId);
|
|
1926
|
+
__privateGet(this, _debug).call(this, `${chalk.magenta(` --> runner: [${runnerId}]`)} Next iteration number: [${newIteration}] for next Execute or Resume.`);
|
|
1925
1927
|
await __privateGet(this, _UpdateRunnerStateById).call(this, runnerId, IRunnerState.paused);
|
|
1926
1928
|
} catch (error) {
|
|
1927
1929
|
console.error(`#ExecuteRunner(): Error: [${error}]`);
|
|
@@ -2226,10 +2228,12 @@ class STSWorkerManager {
|
|
|
2226
2228
|
__privateGet(this, _debug2).call(this, chalk.grey(`Ending publish for runner: [${JSON.stringify(runnerEx.asyncRunnerContext)}]`));
|
|
2227
2229
|
runnerEx.publishInstrumentController.EndPublish();
|
|
2228
2230
|
}
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
__privateGet(this, _archiveList).
|
|
2231
|
+
if (runnerEx.state !== IRunnerState.terminated) {
|
|
2232
|
+
const runner = this.CreateRunnerCopy(runnerEx);
|
|
2233
|
+
__privateGet(this, _archiveList).push(runner);
|
|
2234
|
+
if (__privateGet(this, _archiveList).length > __privateGet(this, _options2).maxArchiveListLength) {
|
|
2235
|
+
__privateGet(this, _archiveList).shift();
|
|
2236
|
+
}
|
|
2233
2237
|
}
|
|
2234
2238
|
delete workerEx.runnersEx[removeList[i].runnerId];
|
|
2235
2239
|
}
|
|
@@ -2694,13 +2698,14 @@ class STSWorkerManager {
|
|
|
2694
2698
|
try {
|
|
2695
2699
|
const retVal = __privateGet(this, _BroadcastCommandToAllRunners).call(this, workerEx, __privateGet(this, _TerminateRunner2));
|
|
2696
2700
|
if (workerEx.worker) {
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2701
|
+
setTimeout(() => {
|
|
2702
|
+
workerEx.worker.terminate();
|
|
2703
|
+
__privateGet(this, _debug2).call(this, `Terminated worker: [${workerEx.id}]`);
|
|
2704
|
+
if (__privateGet(this, _workersEx)[workerEx.id]) {
|
|
2705
|
+
delete __privateGet(this, _workersEx)[workerEx.id];
|
|
2706
|
+
console.log(chalk.magenta(`STSWorkerManager:stsWorkerEx.worker.on(exit): Worker: [${workerEx.id}] has been removed from the worker collection.`));
|
|
2707
|
+
}
|
|
2708
|
+
}, 500);
|
|
2704
2709
|
}
|
|
2705
2710
|
return retVal;
|
|
2706
2711
|
} catch (error) {
|