File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ type Config struct {
6161 CommitterCompressionThresholdMB int `env:"COMMITTER_COMPRESSION_THRESHOLD_MB" envDefault:"50"`
6262 CommitterKafkaBatchSize int `env:"COMMITTER_KAFKA_BATCH_SIZE" envDefault:"500"`
6363 CommitterIsLive bool `env:"COMMITTER_IS_LIVE" envDefault:"false"`
64+ CommitterLagByBlocks uint64 `env:"COMMITTER_LAG_BY_BLOCKS" envDefault:"0"`
6465 StagingS3Bucket string `env:"STAGING_S3_BUCKET" envDefault:"thirdweb-insight-production"`
6566 StagingS3Region string `env:"STAGING_S3_REGION" envDefault:"us-west-2"`
6667 StagingS3AccessKeyID string `env:"STAGING_S3_ACCESS_KEY_ID"`
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ func pollLatest() error {
2929 // Update latest block number metric
3030 metrics .CommitterLatestBlockNumber .WithLabelValues (indexerName , chainIdStr ).Set (float64 (latestBlock .Uint64 ()))
3131
32- if nextBlockNumber >= latestBlock .Uint64 () {
32+ if nextBlockNumber + config . Cfg . CommitterLagByBlocks >= latestBlock .Uint64 () {
3333 time .Sleep (250 * time .Millisecond )
3434 continue
3535 }
You can’t perform that action at this time.
0 commit comments