mirror of
https://github.com/grassrootseconomics/eth-tracker.git
synced 2025-02-22 16:00:37 +01:00
fix: bootstrap queue size check
This commit is contained in:
parent
fe01fd1f72
commit
886f90d044
@ -32,11 +32,12 @@ const verifierInterval = 20 * time.Second
|
|||||||
|
|
||||||
func New(o BackfillerOpts) *backfiller {
|
func New(o BackfillerOpts) *backfiller {
|
||||||
return &backfiller{
|
return &backfiller{
|
||||||
db: o.DB,
|
maxQueueSize: o.MaxQueueSize,
|
||||||
logg: o.Logg,
|
db: o.DB,
|
||||||
queue: o.Queue,
|
logg: o.Logg,
|
||||||
stopCh: make(chan struct{}),
|
queue: o.Queue,
|
||||||
ticker: time.NewTicker(verifierInterval),
|
stopCh: make(chan struct{}),
|
||||||
|
ticker: time.NewTicker(verifierInterval),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +88,7 @@ func (b *backfiller) Run(skipLatest bool) error {
|
|||||||
|
|
||||||
if missingBlocksCount > 0 {
|
if missingBlocksCount > 0 {
|
||||||
if missingBlocksCount >= uint(b.maxQueueSize) {
|
if missingBlocksCount >= uint(b.maxQueueSize) {
|
||||||
b.logg.Warn("large number of blocks missing this may result in degraded RPC performance set FORCE_BACKFILL=* to continue", "missing_blocks", missingBlocksCount)
|
b.logg.Warn("large number of blocks missing this may result in degraded RPC performance set FORCE_BACKFILL=* to continue", "missing_blocks", missingBlocksCount, "max_queue_size", b.maxQueueSize)
|
||||||
_, ok := os.LookupEnv("FORCE_BACKFILL")
|
_, ok := os.LookupEnv("FORCE_BACKFILL")
|
||||||
if !ok {
|
if !ok {
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user