@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.cjs CHANGED
@@ -1868,7 +1868,7 @@ var RetentionPoller = class {
1868
1868
  console.warn("[nestjs-durable] `retention` is configured but the store adapter does not implement pruneTerminalRuns; retention is disabled.");
1869
1869
  return;
1870
1870
  }
1871
- await this.sweep();
1871
+ void this.sweep();
1872
1872
  const intervalMs = retention.sweepInterval != null ? (0, import_nestjs_durable_core12.parseDuration)(retention.sweepInterval) : DEFAULT_SWEEP_INTERVAL_MS;
1873
1873
  if (intervalMs > 0) {
1874
1874
  this.timer = setInterval(() => void this.sweep(), intervalMs);
@@ -1891,9 +1891,8 @@ var RetentionPoller = class {
1891
1891
  /**
1892
1892
  * Prune one round.
1893
1893
  *
1894
- * Never rejects, for the same reason {@link TimerPoller.poll} does not: it is awaited inside
1895
- * `onApplicationBootstrap` (so a rejection propagates into the host's `bootstrap()` and kills the
1896
- * process) and fired as `void` on the interval (so a rejection is an unhandled one, also fatal).
1894
+ * Never rejects, for the same reason {@link TimerPoller.poll} does not: it is fired as `void` on
1895
+ * boot and on the interval, so a rejection would be an unhandled one, which is fatal.
1897
1896
  * Pruning history is the least urgent thing this package does — a `pruneTerminalRuns` that fails
1898
1897
  * on a locked table must cost this sweep and nothing more.
1899
1898
  */
@@ -2254,7 +2253,7 @@ var TimerPoller = class {
2254
2253
  console.error(`[nestjs-durable] could not run enqueued run ${runId}:`, error);
2255
2254
  });
2256
2255
  });
2257
- await this.poll();
2256
+ void this.poll();
2258
2257
  const intervalMs = this.options.timerPollMs ?? 1e3;
2259
2258
  if (intervalMs > 0) {
2260
2259
  this.timer = setInterval(() => void this.poll(), intervalMs);
@@ -2286,12 +2285,10 @@ var TimerPoller = class {
2286
2285
  /**
2287
2286
  * One sweep of the engine's recovery work.
2288
2287
  *
2289
- * **This method never rejects, and that is a hard requirement rather than defensiveness.** It has
2290
- * exactly two callers and a rejection out of either one kills the process: on boot it is awaited
2291
- * inside `onApplicationBootstrap`, so the rejection propagates through `NestApplication.init()`
2292
- * into the host's `bootstrap()`; on the interval it is a fire-and-forget `void`, so it surfaces as
2293
- * an unhandled rejection. Both are fatal, and both re-occur on the next boot with the same state,
2294
- * so a single unrecoverable run crash-loops every worker in the deployment — taking down every
2288
+ * **This method never rejects, and that is a hard requirement rather than defensiveness.** Both
2289
+ * callers (the boot kick-off and the interval) fire it as `void`, so a rejection would surface as
2290
+ * an unhandled rejection, which is fatal, and would re-occur on the next boot with the same state:
2291
+ * a single unrecoverable run would crash-loop every worker in the deployment, taking down every
2295
2292
  * other workflow with it. A poll that goes wrong must cost this tick, not the pod.
2296
2293
  *
2297
2294
  * Each sweep is isolated separately because they are independent: a store that fails