@thru/indexer 0.2.34 → 0.2.35

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
@@ -1298,10 +1298,11 @@ Then run: pnpm drizzle-kit push (or generate + migrate)
1298
1298
  const status = this.statusFor(kind, name);
1299
1299
  while (!this.abortController?.signal.aborted) {
1300
1300
  const observer = this.createObserver(kind, name, options.endpointLabel);
1301
+ const runStartedAtMs = Date.now();
1301
1302
  this.setStreamState(status, attempt === 0 ? "starting" : "retrying", {
1302
1303
  attempt
1303
1304
  });
1304
- status.lastStartedAt = (/* @__PURE__ */ new Date()).toISOString();
1305
+ status.lastStartedAt = new Date(runStartedAtMs).toISOString();
1305
1306
  try {
1306
1307
  const summary = await runOnce(observer);
1307
1308
  if (this.abortController?.signal.aborted) {
@@ -1328,6 +1329,9 @@ Then run: pnpm drizzle-kit push (or generate + migrate)
1328
1329
  endpointLabel: options.endpointLabel
1329
1330
  });
1330
1331
  }
1332
+ if (Date.now() - runStartedAtMs >= options.maxBackoffMs) {
1333
+ attempt = 0;
1334
+ }
1331
1335
  const backoffMs = this.supervisorBackoffMs(attempt, options.initialBackoffMs, options.maxBackoffMs);
1332
1336
  this.logger.warn("Indexer stream supervisor restarting", {
1333
1337
  event: "indexer.stream.supervisor_restart",