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 165021e commit 9b6e6f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/database/sql/bundles/repair.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ FROM (
ORDER BY b.import_attempt_count, b.last_queued_at ASC
LIMIT @limit
)
ORDER BY RANDOM()

-- updateFullyIndexedAt
UPDATE bundles
Expand Down
10 changes: 6 additions & 4 deletions src/database/standalone-sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -812,14 +812,16 @@ export class StandaloneSqliteDatabaseWorker {
getFailedBundleIds(limit: number) {
const reprocessCutoff = currentUnixTimestamp() - BUNDLE_REPROCESS_WAIT_SECS;

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

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

const rows = this.stmts.bundles.selectFailedBundleIds.all({
limit,
reprocess_cutoff: reprocessCutoff,
rowsLength: rows.length,
});

return rows.map((row): string => toB64Url(row.id));
Expand Down
1 change: 1 addition & 0 deletions src/workers/bundle-repair-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export class BundleRepairWorker {
);

this.log.debug('Bundles to retry', {
idsLength: bundleIds.length,
bundleIds,
batchSize: config.BUNDLE_REPAIR_RETRY_BATCH_SIZE,
});
Expand Down

0 comments on commit 9b6e6f1

Please sign in to comment.