@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.
|
@@ -2462,7 +2462,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
2462
2462
|
throw error;
|
|
2463
2463
|
}
|
|
2464
2464
|
});
|
|
2465
|
-
__publicField(this, "AddWorker", (workerOptions, useWorkerFactory) => {
|
|
2465
|
+
__publicField(this, "AddWorker", async (workerOptions, useWorkerFactory) => {
|
|
2466
2466
|
try {
|
|
2467
2467
|
let workerFactory;
|
|
2468
2468
|
if (useWorkerFactory) {
|
|
@@ -2638,7 +2638,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
2638
2638
|
}
|
|
2639
2639
|
__privateGet(this, _workersEx)[stsWorkerEx.id] = stsWorkerEx;
|
|
2640
2640
|
__privateGet(this, _debug2).call(this, `Added worker: [${stsWorkerEx.id}]`);
|
|
2641
|
-
|
|
2641
|
+
await stsutils.Sleep(10);
|
|
2642
|
+
const worker = await this.GetWorker(stsWorkerEx.id);
|
|
2643
|
+
if (worker.id.localeCompare(stsWorkerEx.id) === 0) {
|
|
2644
|
+
return stsWorkerEx;
|
|
2645
|
+
} else {
|
|
2646
|
+
throw new Error("AddWorker(): Could not get newly created worker.");
|
|
2647
|
+
}
|
|
2642
2648
|
} catch (error) {
|
|
2643
2649
|
__privateGet(this, _error2).call(this, `AddWorker: Error: [${error}]`);
|
|
2644
2650
|
throw error;
|