@nsshunt/stsrunnerframework 1.0.76 → 1.0.78
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/dist/stsrunnerframework.mjs +14 -4
- package/dist/stsrunnerframework.mjs.map +1 -1
- package/dist/stsrunnerframework.umd.js +14 -4
- package/dist/stsrunnerframework.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/commonTypes.d.ts +2 -0
- package/types/commonTypes.d.ts.map +1 -1
- package/types/workerManager.d.ts +1 -0
- package/types/workerManager.d.ts.map +1 -1
|
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
11
11
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
12
|
-
var _collectorCollectorPort, _runners, _options, _workerId, _debug, _error, _processLoopExecutor, _SetMessagePort, _CreateRunnerEx2RunState, _UpdateRunnerStateById, _GetAllRunners, _CanExecuteNextIterationById, _IsCompletedById, _GetRunnerIterationById, _ResetRunnerIterationById, _IncRunnerIterationById, _GetRunnerInstanceById, _GetRunnerExecutionProfileById, _GetRunnerOptionsById, _SetRunnerOptionsById, _AddRunner, _WorkerInstance_instances, SleepImmediate_fn, _PostMessageToWorkerManagerById, _StartRunner, _StopRunnerByRunnerById, _StopAllRunners, _StopRunner, _TerminateRunner, _PauseRunner, _ResumeRunner, _ResetRunner, _ExecuteRunner, _UpdateOptions, _workersEx, _options2, _STSInstrumentController, _telemetryProcessor, _archiveList, _processLoopExecutor2, _debug2, _SetRunnerIntoWorker, _ProcessTelemetry, _EmitEvent, _RunnerStateChange, _RemoveRunnerFromCollection, _CreateAsyncRunner, _PostMessageToWorkerUsingDefaultChannel, _PostMessageToWorker, _StartRunner2, _ResetRunner2, _ExecuteRunner2, _StopRunner2, _TerminateRunner2, _PauseRunner2, _ResumeRunner2, _BroadcastCommandToAllRunners, _PauseWorker, _ResumeWorker, _StopWorker, _StartWorker, _ResetWorker, _ExecuteWorker, _BroadcastUpdateCommandToAllRunners, _UpdateOptionsWorker, _TerminateWorker, _UpdateOptions2;
|
|
12
|
+
var _collectorCollectorPort, _runners, _options, _workerId, _debug, _error, _processLoopExecutor, _SetMessagePort, _CreateRunnerEx2RunState, _UpdateRunnerStateById, _GetAllRunners, _CanExecuteNextIterationById, _IsCompletedById, _GetRunnerIterationById, _ResetRunnerIterationById, _IncRunnerIterationById, _GetRunnerInstanceById, _GetRunnerExecutionProfileById, _GetRunnerOptionsById, _SetRunnerOptionsById, _AddRunner, _WorkerInstance_instances, SleepImmediate_fn, _PostMessageToWorkerManagerById, _StartRunner, _StopRunnerByRunnerById, _StopAllRunners, _StopRunner, _TerminateRunner, _PauseRunner, _ResumeRunner, _ResetRunner, _ExecuteRunner, _UpdateOptions, _workersEx, _options2, _STSInstrumentController, _telemetryProcessor, _archiveList, _id, _processLoopExecutor2, _debug2, _SetRunnerIntoWorker, _ProcessTelemetry, _EmitEvent, _RunnerStateChange, _RemoveRunnerFromCollection, _CreateAsyncRunner, _PostMessageToWorkerUsingDefaultChannel, _PostMessageToWorker, _StartRunner2, _ResetRunner2, _ExecuteRunner2, _StopRunner2, _TerminateRunner2, _PauseRunner2, _ResumeRunner2, _BroadcastCommandToAllRunners, _PauseWorker, _ResumeWorker, _StopWorker, _StartWorker, _ResetWorker, _ExecuteWorker, _BroadcastUpdateCommandToAllRunners, _UpdateOptionsWorker, _TerminateWorker, _UpdateOptions2;
|
|
13
13
|
import { defaultLogger, Sleep, ModelDelimeter } from "@nsshunt/stsutils";
|
|
14
14
|
import { Gauge } from "@nsshunt/stsobservability";
|
|
15
15
|
const URI_BASE_VUEUTILS = "/";
|
|
@@ -2025,6 +2025,7 @@ class STSWorkerManager {
|
|
|
2025
2025
|
__privateAdd(this, _STSInstrumentController, null);
|
|
2026
2026
|
__privateAdd(this, _telemetryProcessor, null);
|
|
2027
2027
|
__privateAdd(this, _archiveList, []);
|
|
2028
|
+
__privateAdd(this, _id);
|
|
2028
2029
|
__privateAdd(this, _processLoopExecutor2, async () => {
|
|
2029
2030
|
const removeList = [];
|
|
2030
2031
|
for (const [, workerEx] of Object.entries(__privateGet(this, _workersEx))) {
|
|
@@ -2088,6 +2089,7 @@ class STSWorkerManager {
|
|
|
2088
2089
|
const workerId = v4();
|
|
2089
2090
|
const stsWorkerEx = {
|
|
2090
2091
|
id: workerId,
|
|
2092
|
+
workerManagerId: __privateGet(this, _id),
|
|
2091
2093
|
worker: workerFactory.createWorkerThreadWorker(),
|
|
2092
2094
|
messagePort: port1,
|
|
2093
2095
|
options: workerOptions,
|
|
@@ -2284,6 +2286,7 @@ class STSWorkerManager {
|
|
|
2284
2286
|
const runnerEx = {
|
|
2285
2287
|
id: runnerId,
|
|
2286
2288
|
workerId: workerEx.id,
|
|
2289
|
+
workerManagerId: __privateGet(this, _id),
|
|
2287
2290
|
state: IRunnerState.created,
|
|
2288
2291
|
iteration: 0,
|
|
2289
2292
|
publishInstrumentController: __privateGet(this, _STSInstrumentController) ? __privateGet(this, _STSInstrumentController).AddPublishInstrumentController(asyncRunnerContext) : void 0,
|
|
@@ -2549,6 +2552,7 @@ class STSWorkerManager {
|
|
|
2549
2552
|
}
|
|
2550
2553
|
return await Promise.all(promArray);
|
|
2551
2554
|
});
|
|
2555
|
+
__privateSet(this, _id, v4());
|
|
2552
2556
|
if (options) {
|
|
2553
2557
|
__privateSet(this, _options2, options);
|
|
2554
2558
|
} else {
|
|
@@ -2568,7 +2572,8 @@ class STSWorkerManager {
|
|
|
2568
2572
|
iteration: runnerEx.iteration,
|
|
2569
2573
|
options: { ...runnerEx.options },
|
|
2570
2574
|
state: runnerEx.state,
|
|
2571
|
-
workerId: runnerEx.workerId
|
|
2575
|
+
workerId: runnerEx.workerId,
|
|
2576
|
+
workerManagerId: __privateGet(this, _id)
|
|
2572
2577
|
};
|
|
2573
2578
|
}
|
|
2574
2579
|
CreateRunnerCopy(runnerEx) {
|
|
@@ -2579,17 +2584,21 @@ class STSWorkerManager {
|
|
|
2579
2584
|
return retVal;
|
|
2580
2585
|
}
|
|
2581
2586
|
CreateWorkerCopy(workerEx) {
|
|
2582
|
-
const { id, options, runnersEx } = workerEx;
|
|
2587
|
+
const { id, options, runnersEx, workerManagerId } = workerEx;
|
|
2583
2588
|
const workerCopy = {
|
|
2584
2589
|
id,
|
|
2585
2590
|
options: { ...options },
|
|
2586
|
-
runners: {}
|
|
2591
|
+
runners: {},
|
|
2592
|
+
workerManagerId
|
|
2587
2593
|
};
|
|
2588
2594
|
for (const [, runnerEx] of Object.entries(runnersEx)) {
|
|
2589
2595
|
workerCopy.runners[runnerEx.id] = this.CreateRunnerCopy(runnerEx);
|
|
2590
2596
|
}
|
|
2591
2597
|
return workerCopy;
|
|
2592
2598
|
}
|
|
2599
|
+
get id() {
|
|
2600
|
+
return __privateGet(this, _id);
|
|
2601
|
+
}
|
|
2593
2602
|
get Workers() {
|
|
2594
2603
|
const retVal = {};
|
|
2595
2604
|
for (const [, workerEx] of Object.entries(__privateGet(this, _workersEx))) {
|
|
@@ -2615,6 +2624,7 @@ _options2 = new WeakMap();
|
|
|
2615
2624
|
_STSInstrumentController = new WeakMap();
|
|
2616
2625
|
_telemetryProcessor = new WeakMap();
|
|
2617
2626
|
_archiveList = new WeakMap();
|
|
2627
|
+
_id = new WeakMap();
|
|
2618
2628
|
_processLoopExecutor2 = new WeakMap();
|
|
2619
2629
|
_debug2 = new WeakMap();
|
|
2620
2630
|
_SetRunnerIntoWorker = new WeakMap();
|