Skip to content

feat(replay): add replayAllUnresolvedFailedEvents with progress logging - #655

Merged
bbjiggy merged 1 commit into
ourdao:mainfrom
defimomof2:fix/replay-progress-logging-523
Nov 23, 2026
Merged

bbjiggy merged 1 commit into
ourdao:mainfrom
defimomof2:fix/replay-progress-logging-523

Conversation

@defimomof2

@defimomof2 defimomof2 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements replayAllUnresolvedFailedEvents in src/indexer/replay.ts with periodic progress logging, addressing the gap identified in issue #523.

What changed:

  • src/indexer/replay.ts: Added replayAllUnresolvedFailedEvents(). It queries only unresolved rows (resolved_at IS NULL) from failed_events, replays each in its own transaction, and logs a progress line every 2 s (default) in the same format reindexFromEventLog uses:

    [replay] progress: N/total event(s) (pct%) — rate ev/s, elapsed Ns, ETA Ns
    

    The interval is an optional parameter so tests can pass 0 to force every event to log.

  • test/indexer-replay-all.test.ts: Added a progress-logging test that passes 0 ms as the interval, captures console.log, and asserts the [replay] progress: pattern is emitted with the expected fields (ev/s, elapsed, ETA).

Closes #523

Closes #511
Closes #517
Closes #524

Implements replayAllUnresolvedFailedEvents in src/indexer/replay.ts (issue ourdao#523).
The function queries only unresolved rows (resolved_at IS NULL), replays each in
its own transaction, and logs periodic progress lines matching reindexFromEventLog's
format: [replay] progress: N/total event(s) (pct%) — rate ev/s, elapsed Ns, ETA Ns.
Progress fires every 2 s by default; the interval is overridable for tests.

Adds a progress-logging test to test/indexer-replay-all.test.ts that passes 0 ms
so every event triggers a log line and asserts the [replay] progress: pattern.
@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

@defimomof2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@bbjiggy
bbjiggy merged commit 9722b7a into ourdao:main Nov 23, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants