mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-10 04:20:26 +08:00
减少带宽统计显示的空档期
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/goman"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"github.com/iwind/TeaGo/types"
|
||||
"sync"
|
||||
@@ -20,10 +19,7 @@ var serverBandwidthStatsMap = map[string]*pb.ServerBandwidthStat{} // key => ban
|
||||
var serverBandwidthStatsLocker = &sync.Mutex{}
|
||||
|
||||
func init() {
|
||||
var ticker = time.NewTicker(5 * time.Minute)
|
||||
if Tea.IsTesting() {
|
||||
ticker = time.NewTicker(1 * time.Minute)
|
||||
}
|
||||
var ticker = time.NewTicker(1 * time.Minute)
|
||||
|
||||
dbs.OnReadyDone(func() {
|
||||
goman.New(func() {
|
||||
|
||||
Reference in New Issue
Block a user