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