@nsshunt/stsrunnerframework 1.0.135 → 1.0.137

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.
@@ -1815,12 +1815,12 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
1815
1815
  await stsutils.Sleep(0);
1816
1816
  const startLoop = /* @__PURE__ */ new Date();
1817
1817
  const ExecuteLoop = async () => {
1818
- var _a2, _b;
1818
+ var _a2, _b, _c;
1819
1819
  try {
1820
1820
  let cont = true;
1821
1821
  const executionProfile = __privateGet(this, _GetRunnerExecutionProfileById).call(this, runnerId);
1822
1822
  if (executionProfile) {
1823
- const { iterations, duration, delayBetweenIterations } = executionProfile;
1823
+ const { iterations, duration, delayBetweenIterations, pauseOnComplete } = executionProfile;
1824
1824
  if (iterations > 0) {
1825
1825
  cont = __privateGet(this, _GetRunnerIterationById).call(this, runnerId) < iterations;
1826
1826
  } else if (duration > 0) {
@@ -1847,8 +1847,13 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
1847
1847
  }
1848
1848
  }
1849
1849
  } else {
1850
- await ((_b = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _b.Completed());
1851
- __privateGet(this, _UpdateRunnerStateById).call(this, runnerId, IRunnerState.completed);
1850
+ if (pauseOnComplete === true) {
1851
+ await ((_b = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _b.PauseRunner());
1852
+ __privateGet(this, _UpdateRunnerStateById).call(this, runnerId, IRunnerState.paused);
1853
+ } else {
1854
+ await ((_c = __privateGet(this, _GetRunnerInstanceById).call(this, runnerId)) == null ? void 0 : _c.Completed());
1855
+ __privateGet(this, _UpdateRunnerStateById).call(this, runnerId, IRunnerState.completed);
1856
+ }
1852
1857
  }
1853
1858
  } else {
1854
1859
  __privateGet(this, _warn).call(this, `#StartRunner:ExecuteLoop(): Cannot get execution profile for runner: [${runnerId}]`);