From c5dfa98ffee48ca4b36f7aaa64bbf4b2993e837d Mon Sep 17 00:00:00 2001 From: Arijit Das Date: Thu, 23 Dec 2021 20:04:34 +0530 Subject: [PATCH] Refactor. --- pkg/snapshot/publisher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/snapshot/publisher.go b/pkg/snapshot/publisher.go index b6a4e59..4a680d8 100644 --- a/pkg/snapshot/publisher.go +++ b/pkg/snapshot/publisher.go @@ -32,7 +32,7 @@ import ( "github.com/ethereum/go-ethereum/statediff/indexer/shared" ) -const period = 1 * time.Minute +const logInterval = 1 * time.Minute // Publisher is wrapper around DB. type Publisher struct { @@ -189,7 +189,7 @@ func (p *Publisher) checkBatchSize(tx *sqlx.Tx, maxBatchSize uint) (*sqlx.Tx, er // printNodeCounters prints number of node processed. func (p *Publisher) printNodeCounters() { - t := time.NewTicker(period) + t := time.NewTicker(logInterval) for range t.C { logrus.Infof("processed state nodes %d", atomic.LoadUint64(&p.stateNodeCounter)) logrus.Infof("processed storage nodes %d", atomic.LoadUint64(&p.storageNodeCounter))