@nsshunt/stsrunnerframework 1.0.151 → 1.0.152
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.
|
@@ -2460,7 +2460,7 @@ class STSWorkerManager {
|
|
|
2460
2460
|
throw error;
|
|
2461
2461
|
}
|
|
2462
2462
|
});
|
|
2463
|
-
__publicField(this, "AddWorker", (workerOptions, useWorkerFactory) => {
|
|
2463
|
+
__publicField(this, "AddWorker", async (workerOptions, useWorkerFactory) => {
|
|
2464
2464
|
try {
|
|
2465
2465
|
let workerFactory;
|
|
2466
2466
|
if (useWorkerFactory) {
|
|
@@ -2636,7 +2636,13 @@ class STSWorkerManager {
|
|
|
2636
2636
|
}
|
|
2637
2637
|
__privateGet(this, _workersEx)[stsWorkerEx.id] = stsWorkerEx;
|
|
2638
2638
|
__privateGet(this, _debug2).call(this, `Added worker: [${stsWorkerEx.id}]`);
|
|
2639
|
-
|
|
2639
|
+
await Sleep(10);
|
|
2640
|
+
const worker = await this.GetWorker(stsWorkerEx.id);
|
|
2641
|
+
if (worker.id.localeCompare(stsWorkerEx.id) === 0) {
|
|
2642
|
+
return stsWorkerEx;
|
|
2643
|
+
} else {
|
|
2644
|
+
throw new Error("AddWorker(): Could not get newly created worker.");
|
|
2645
|
+
}
|
|
2640
2646
|
} catch (error) {
|
|
2641
2647
|
__privateGet(this, _error2).call(this, `AddWorker: Error: [${error}]`);
|
|
2642
2648
|
throw error;
|