@nsshunt/stsrunnerframework 1.0.137 → 1.0.139

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.
@@ -1821,6 +1821,9 @@ class WorkerInstance {
1821
1821
  const { iterations, duration, delayBetweenIterations, pauseOnComplete } = executionProfile;
1822
1822
  if (iterations > 0) {
1823
1823
  cont = __privateGet(this, _GetRunnerIterationById).call(this, runnerId) < iterations;
1824
+ if (cont === false && pauseOnComplete === true && __privateGet(this, _runners)[runnerId].runner.state === IRunnerState.paused) {
1825
+ cont = true;
1826
+ }
1824
1827
  } else if (duration > 0) {
1825
1828
  cont = ((/* @__PURE__ */ new Date()).getTime() - startLoop.getTime()) / 1e3 < duration;
1826
1829
  }
@@ -1848,6 +1851,7 @@ class WorkerInstance {
1848
1851
  if (pauseOnComplete === true) {
1849
1852
  await ((_b = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _b.PauseRunner());
1850
1853
  __privateGet(this, _UpdateRunnerStateById).call(this, runnerId, IRunnerState.paused);
1854
+ ExecuteLoop();
1851
1855
  } else {
1852
1856
  await ((_c = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _c.Completed());
1853
1857
  __privateGet(this, _UpdateRunnerStateById).call(this, runnerId, IRunnerState.completed);