@nsshunt/stsrunnerframework 1.0.120 → 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,12 +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
2400
|
const retVal = {};
|
|
2399
2401
|
for (const [, workerEx] of Object.entries(__privateGet(this, _workersEx))) {
|
|
2400
|
-
retVal[workerEx.id] = this.CreateWorkerCopySmall(workerEx);
|
|
2402
|
+
retVal[workerEx.id] = this.CreateWorkerCopySmall(workerEx, states);
|
|
2401
2403
|
}
|
|
2402
2404
|
return retVal;
|
|
2403
2405
|
} catch (error) {
|
|
@@ -3261,15 +3263,15 @@ class STSWorkerManager {
|
|
|
3261
3263
|
throw error;
|
|
3262
3264
|
}
|
|
3263
3265
|
}
|
|
3264
|
-
CreateWorkerCopySmall(workerEx) {
|
|
3266
|
+
CreateWorkerCopySmall(workerEx, states) {
|
|
3265
3267
|
try {
|
|
3266
3268
|
const workerCopy = {
|
|
3267
3269
|
id: workerEx.id,
|
|
3268
3270
|
runners: {}
|
|
3269
3271
|
};
|
|
3270
|
-
|
|
3272
|
+
Object.values(workerEx.runnersEx).filter((runnerEx) => states.length === 0 ? true : states.includes(runnerEx.state)).forEach((runnerEx) => {
|
|
3271
3273
|
workerCopy.runners[runnerEx.id] = this.CreateRunnerCopySmall(runnerEx);
|
|
3272
|
-
}
|
|
3274
|
+
});
|
|
3273
3275
|
return workerCopy;
|
|
3274
3276
|
} catch (error) {
|
|
3275
3277
|
__privateGet(this, _error2).call(this, `CreateWorkerCopySmall(): Error: [${error}]`);
|