refresh top miners every 30 seconds (#2673)

This commit is contained in:
Frrist 2020-07-29 16:34:34 -07:00 committed by GitHub
parent a1808ae019
commit 8b98fe1bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ import (
var log = logging.Logger("scheduler")
// Scheduler manages the execution of jobs triggered
// by tickers. Not externally configuable at runtime.
// by tickers. Not externally configurable at runtime.
type Scheduler struct {
db *sql.DB
}
@ -44,7 +44,7 @@ func (s *Scheduler) Start(ctx context.Context) {
if err := refreshTopMinerByBaseReward(ctx, s.db); err != nil {
log.Errorf(err.Error())
}
refreshTopMinerCh := time.NewTicker(6 * time.Hour)
refreshTopMinerCh := time.NewTicker(30 * time.Second)
defer refreshTopMinerCh.Stop()
for {
select {