@nsshunt/stsrunnerframework 1.0.61 → 1.0.62

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.
@@ -13,7 +13,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
13
13
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
14
14
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
15
15
 
16
- var _collectorCollectorPort, _runners, _options3, _workerId, _debug, _SetMessagePort, _CreateRunnerEx2RunState, _UpdateRunnerStateById, _GetAllRunners, _CanExecuteNextIterationById, _GetRunnerIterationById, _ResetRunnerIterationById, _IncRunnerIterationById, _GetRunnerInstanceById, _GetRunnerExecutionProfileById, _GetRunnerOptionsById, _SetRunnerOptionsById, _AddRunner, _WorkerInstance_instances, SleepImmediate_fn, _PostMessageToWorkerManagerById, _StartRunner, _StopRunnerByRunnerById, _StopAllRunners, _StopRunner, _TerminateRunner, _PauseRunner, _ResumeRunner, _ResetRunner, _ExecuteRunner, _UpdateOptions, _workersEx, _options4, _STSInstrumentController, _telemetryProcessor, _debug2, _STSWorkerManager_instances, CreateRunnerCopy_fn, _SetRunnerIntoWorker, _ProcessTelemetry, _RunnerStateChange, _ProcessCompleted, _CreateAsyncRunner, _PostMessageToWorkerUsingDefaultChannel, _PostMessageToWorker, _StartRunner2, _ResetRunner2, _ExecuteRunner2, _StopRunner2, _TerminateRunner2, _PauseRunner2, _ResumeRunner2, _BroadcastCommandToAllRunners, _PauseWorker, _ResumeWorker, _StopWorker, _StartWorker, _ResetWorker, _ExecuteWorker, _BroadcastUpdateCommandToAllRunners, _UpdateOptionsWorker, _TerminateWorker, _UpdateOptions2, _options5, _rest01Client, _accessToken2, _agentManager, _authUtilsNode, _GetAccessToken;
16
+ var _collectorCollectorPort, _runners, _options3, _workerId, _debug, _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, _options4, _STSInstrumentController, _telemetryProcessor, _debug2, _STSWorkerManager_instances, CreateRunnerCopy_fn, _SetRunnerIntoWorker, _ProcessTelemetry, _RunnerStateChange, _ProcessCompleted, _CreateAsyncRunner, _PostMessageToWorkerUsingDefaultChannel, _PostMessageToWorker, _StartRunner2, _ResetRunner2, _ExecuteRunner2, _StopRunner2, _TerminateRunner2, _PauseRunner2, _ResumeRunner2, _BroadcastCommandToAllRunners, _PauseWorker, _ResumeWorker, _StopWorker, _StartWorker, _ResetWorker, _ExecuteWorker, _BroadcastUpdateCommandToAllRunners, _UpdateOptionsWorker, _TerminateWorker, _UpdateOptions2, _options5, _rest01Client, _accessToken2, _agentManager, _authUtilsNode, _GetAccessToken;
17
17
  const URI_BASE_VUEUTILS = "/";
18
18
  const STS_RF_RES_PREFIX = "STS_R_RF_";
19
19
  const STS_RF_RES_ENT_PREFIX = "STS_RE_RF_";
@@ -1611,6 +1611,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
1611
1611
  }
1612
1612
  return false;
1613
1613
  });
1614
+ __privateAdd(this, _IsCompletedById, (id) => {
1615
+ const state = __privateGet(this, _runners)[id].runner.state;
1616
+ if (state === IRunnerState.error || state === IRunnerState.completed || state === IRunnerState.stopped || state === IRunnerState.terminated) {
1617
+ return true;
1618
+ }
1619
+ return false;
1620
+ });
1614
1621
  __privateAdd(this, _GetRunnerIterationById, (id) => {
1615
1622
  return __privateGet(this, _runners)[id].runner.iteration;
1616
1623
  });
@@ -1674,8 +1681,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
1674
1681
  }
1675
1682
  ExecuteLoop();
1676
1683
  } else {
1677
- await stsutils.Sleep(50);
1678
- ExecuteLoop();
1684
+ if (!__privateGet(this, _IsCompletedById).call(this, runnerId)) {
1685
+ await stsutils.Sleep(50);
1686
+ ExecuteLoop();
1687
+ }
1679
1688
  }
1680
1689
  } else {
1681
1690
  await __privateGet(this, _GetRunnerInstanceById).call(this, runnerId).Completed();
@@ -1831,6 +1840,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
1831
1840
  _UpdateRunnerStateById = new WeakMap();
1832
1841
  _GetAllRunners = new WeakMap();
1833
1842
  _CanExecuteNextIterationById = new WeakMap();
1843
+ _IsCompletedById = new WeakMap();
1834
1844
  _GetRunnerIterationById = new WeakMap();
1835
1845
  _ResetRunnerIterationById = new WeakMap();
1836
1846
  _IncRunnerIterationById = new WeakMap();
@@ -2163,6 +2173,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
2163
2173
  }
2164
2174
  }
2165
2175
  });
2176
+ //@@ make this have an event
2177
+ //@@ make refactor event to own method
2178
+ //@@ check for other events to capture
2166
2179
  __privateAdd(this, _RunnerStateChange, (workerEx, payloadContents) => {
2167
2180
  const { runner } = payloadContents;
2168
2181
  if (workerEx.runnersEx[runner.id]) {