优化节点配置生成速度

This commit is contained in:
GoEdgeLab
2021-11-11 14:16:42 +08:00
parent d18bddddd0
commit 212cf5b112
49 changed files with 527 additions and 198 deletions

View File

@@ -54,7 +54,7 @@ func init() {
// SaveStats 提交数据
func (this *ServerDailyStatDAO) SaveStats(tx *dbs.Tx, stats []*pb.ServerDailyStat) error {
var serverUserMap = map[int64]int64{} // serverId => userId
var cacheMap = maps.Map{}
var cacheMap = utils.NewCacheMap()
for _, stat := range stats {
day := timeutil.FormatTime("Ymd", stat.CreatedAt)
hour := timeutil.FormatTime("YmdH", stat.CreatedAt)