Skip to content

Commit

Permalink
Merge pull request #77 from moonstream-to/fix-block-1
Browse files Browse the repository at this point in the history
Add fix for auto jobs finish.
  • Loading branch information
Andrei-Dolgolev authored Oct 1, 2024
2 parents 8aec2aa + bf62d53 commit 966fdab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions synchronizer/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,18 @@ func (d *Synchronizer) HistoricalSyncRef(customerDbUriFlag string, addresses []s
d.startBlock = d.endBlock - 1

if isCycleFinished || d.startBlock == 0 {
if autoJobs {
for address, abisInfo := range addressesAbisInfo {

log.Printf("Finished crawling for address %s at block %d\n", address, abisInfo.DeployedBlockNumber)

// update the status of the address for the customer to done
err := indexer.DBConnection.UpdateAbisAsDone(abisInfo.IDs)
if err != nil {
return err
}
}
}
log.Println("Finished processing all customer updates")
break
}
Expand Down

0 comments on commit 966fdab

Please sign in to comment.