Skip to content

Commit

Permalink
fix(store-indexer): subscribe postgres indexer to stream (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Sep 16, 2023
1 parent 9b43029 commit ed07018
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-kangaroos-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/store-indexer": patch
---

Fixes postgres indexer stopping sync after it catches up to the latest block.
2 changes: 2 additions & 0 deletions packages/store-indexer/bin/postgres-indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ const { latestBlockNumber$, storedBlockLogs$ } = await createStoreSync({
maxBlockRange: env.MAX_BLOCK_RANGE,
});

storedBlockLogs$.subscribe();

combineLatest([latestBlockNumber$, storedBlockLogs$])
.pipe(
filter(
Expand Down

0 comments on commit ed07018

Please sign in to comment.