@nsshunt/stsrunnerframework 1.0.119 → 1.0.121
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.
|
@@ -2392,13 +2392,14 @@ class STSWorkerManager {
|
|
|
2392
2392
|
throw error;
|
|
2393
2393
|
}
|
|
2394
2394
|
});
|
|
2395
|
-
|
|
2395
|
+
// only include runners that are in the specified states.
|
|
2396
|
+
// Use [] to include all runners irrespective of state.
|
|
2397
|
+
__publicField(this, "GetWorkersSmall", async (states) => {
|
|
2396
2398
|
try {
|
|
2397
2399
|
await __privateGet(this, _SyncWorkerDataFromWorkers).call(this);
|
|
2398
|
-
const retVal =
|
|
2399
|
-
retVal.push(__privateGet(this, _id));
|
|
2400
|
+
const retVal = {};
|
|
2400
2401
|
for (const [, workerEx] of Object.entries(__privateGet(this, _workersEx))) {
|
|
2401
|
-
retVal.
|
|
2402
|
+
retVal[workerEx.id] = this.CreateWorkerCopySmall(workerEx, states);
|
|
2402
2403
|
}
|
|
2403
2404
|
return retVal;
|
|
2404
2405
|
} catch (error) {
|
|
@@ -3262,19 +3263,15 @@ class STSWorkerManager {
|
|
|
3262
3263
|
throw error;
|
|
3263
3264
|
}
|
|
3264
3265
|
}
|
|
3265
|
-
CreateWorkerCopySmall(workerEx) {
|
|
3266
|
+
CreateWorkerCopySmall(workerEx, states) {
|
|
3266
3267
|
try {
|
|
3267
|
-
const workerCopy =
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
runnerCopy.push(runnerEx.state);
|
|
3275
|
-
runnerCopy.push(runnerEx.options.plan);
|
|
3276
|
-
workerCopy.push(runnerCopy);
|
|
3277
|
-
}
|
|
3268
|
+
const workerCopy = {
|
|
3269
|
+
id: workerEx.id,
|
|
3270
|
+
runners: {}
|
|
3271
|
+
};
|
|
3272
|
+
Object.values(workerEx.runnersEx).filter((runnerEx) => states.length === 0 ? true : states.includes(runnerEx.state)).forEach((runnerEx) => {
|
|
3273
|
+
workerCopy.runners[runnerEx.id] = this.CreateRunnerCopySmall(runnerEx);
|
|
3274
|
+
});
|
|
3278
3275
|
return workerCopy;
|
|
3279
3276
|
} catch (error) {
|
|
3280
3277
|
__privateGet(this, _error2).call(this, `CreateWorkerCopySmall(): Error: [${error}]`);
|