Skip to content

Commit

Permalink
log list of bundles to retry
Browse files Browse the repository at this point in the history
  • Loading branch information
karlprieb committed Jan 14, 2025
1 parent 997f375 commit 165021e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export const BUNDLE_REPAIR_RETRY_INTERVAL_SECONDS = +env.varOrDefault(
);

export const BUNDLE_REPAIR_RETRY_BATCH_SIZE = +env.varOrDefault(
'BUNDLE_REPAIR_RETRY_INTERVAL_SECONDS',
'BUNDLE_REPAIR_RETRY_BATCH_SIZE',
'1000',
);

Expand Down
9 changes: 8 additions & 1 deletion src/database/standalone-sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,16 @@ export class StandaloneSqliteDatabaseWorker {
}

getFailedBundleIds(limit: number) {
const reprocessCutoff = currentUnixTimestamp() - BUNDLE_REPROCESS_WAIT_SECS;

this.log.debug('getFailedBundleIds', {
reprocessCutoff,
BUNDLE_REPROCESS_WAIT_SECS,
});

const rows = this.stmts.bundles.selectFailedBundleIds.all({
limit,
reprocess_cutoff: currentUnixTimestamp() - BUNDLE_REPROCESS_WAIT_SECS,
reprocess_cutoff: reprocessCutoff,
});

return rows.map((row): string => toB64Url(row.id));
Expand Down

0 comments on commit 165021e

Please sign in to comment.