@dudousxd/nestjs-durable 0.52.4 → 0.52.6

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.
package/dist/index.js CHANGED
@@ -1771,7 +1771,7 @@ var RetentionPoller = class {
1771
1771
  console.warn("[nestjs-durable] `retention` is configured but the store adapter does not implement pruneTerminalRuns; retention is disabled.");
1772
1772
  return;
1773
1773
  }
1774
- await this.sweep();
1774
+ void this.sweep();
1775
1775
  const intervalMs = retention.sweepInterval != null ? parseDuration(retention.sweepInterval) : DEFAULT_SWEEP_INTERVAL_MS;
1776
1776
  if (intervalMs > 0) {
1777
1777
  this.timer = setInterval(() => void this.sweep(), intervalMs);
@@ -1794,9 +1794,8 @@ var RetentionPoller = class {
1794
1794
  /**
1795
1795
  * Prune one round.
1796
1796
  *
1797
- * Never rejects, for the same reason {@link TimerPoller.poll} does not: it is awaited inside
1798
- * `onApplicationBootstrap` (so a rejection propagates into the host's `bootstrap()` and kills the
1799
- * process) and fired as `void` on the interval (so a rejection is an unhandled one, also fatal).
1797
+ * Never rejects, for the same reason {@link TimerPoller.poll} does not: it is fired as `void` on
1798
+ * boot and on the interval, so a rejection would be an unhandled one, which is fatal.
1800
1799
  * Pruning history is the least urgent thing this package does — a `pruneTerminalRuns` that fails
1801
1800
  * on a locked table must cost this sweep and nothing more.
1802
1801
  */
@@ -2157,7 +2156,7 @@ var TimerPoller = class {
2157
2156
  console.error(`[nestjs-durable] could not run enqueued run ${runId}:`, error);
2158
2157
  });
2159
2158
  });
2160
- await this.poll();
2159
+ void this.poll();
2161
2160
  const intervalMs = this.options.timerPollMs ?? 1e3;
2162
2161
  if (intervalMs > 0) {
2163
2162
  this.timer = setInterval(() => void this.poll(), intervalMs);
@@ -2189,12 +2188,10 @@ var TimerPoller = class {
2189
2188
  /**
2190
2189
  * One sweep of the engine's recovery work.
2191
2190
  *
2192
- * **This method never rejects, and that is a hard requirement rather than defensiveness.** It has
2193
- * exactly two callers and a rejection out of either one kills the process: on boot it is awaited
2194
- * inside `onApplicationBootstrap`, so the rejection propagates through `NestApplication.init()`
2195
- * into the host's `bootstrap()`; on the interval it is a fire-and-forget `void`, so it surfaces as
2196
- * an unhandled rejection. Both are fatal, and both re-occur on the next boot with the same state,
2197
- * so a single unrecoverable run crash-loops every worker in the deployment — taking down every
2191
+ * **This method never rejects, and that is a hard requirement rather than defensiveness.** Both
2192
+ * callers (the boot kick-off and the interval) fire it as `void`, so a rejection would surface as
2193
+ * an unhandled rejection, which is fatal, and would re-occur on the next boot with the same state:
2194
+ * a single unrecoverable run would crash-loop every worker in the deployment, taking down every
2198
2195
  * other workflow with it. A poll that goes wrong must cost this tick, not the pod.
2199
2196
  *
2200
2197
  * Each sweep is isolated separately because they are independent: a store that fails