fix panic reset tiker
This commit is contained in:
parent
8290f5c880
commit
337fa4607a
@ -36,6 +36,9 @@ func (wc *DataUpdater) Start(ctx context.Context) {
|
||||
case <-ticker.C:
|
||||
wc.processTasks(ctx)
|
||||
nextStart = calculateTime()
|
||||
if nextStart <= 0 {
|
||||
nextStart = 86400
|
||||
}
|
||||
ticker.Reset(time.Second * time.Duration(nextStart))
|
||||
case <-ctx.Done():
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user