Skip to content

Commit 92d437e

Browse files
Merge pull request #1027 from cardano-foundation/fix/backfill-race-condition
fix: backfill race condition
2 parents d4160bd + 29e5aea commit 92d437e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/api-cardano-db-hasura/src/background.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ function startAssetPolling (
200200
setupStarted = true
201201
try {
202202
await hasuraBackgroundClient.initialize()
203+
const lastSeenId = await hasuraBackgroundClient.getMaxMultiAssetId(config.db)
203204
const backfilledAssetIds = await hasuraBackgroundClient.backfillMissingAssets(config.db)
204205
await worker.initQueue()
205-
const lastSeenId = await hasuraBackgroundClient.getMaxMultiAssetId(config.db)
206206
startAssetPolling(hasuraBackgroundClient, worker, config.db, lastSeenId, logger)
207207
await metadataClient.initialize()
208208
await worker.start()

0 commit comments

Comments
 (0)