mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-05 17:40:24 +08:00
优化统计
This commit is contained in:
@@ -844,6 +844,11 @@ func (this *ServerBandwidthStatDAO) fixServerStats(stats []*ServerBandwidthStat,
|
|||||||
// HasFullData 检查一个月是否完整数据
|
// HasFullData 检查一个月是否完整数据
|
||||||
// 是为了兼容以前数据,以前的表中没有缓存流量、请求数等字段
|
// 是为了兼容以前数据,以前的表中没有缓存流量、请求数等字段
|
||||||
func (this *ServerBandwidthStatDAO) HasFullData(tx *dbs.Tx, serverId int64, month string) (bool, error) {
|
func (this *ServerBandwidthStatDAO) HasFullData(tx *dbs.Tx, serverId int64, month string) (bool, error) {
|
||||||
|
// 最迟在2024年完成过渡
|
||||||
|
if time.Now().Year() >= 2024 {
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
|
||||||
var monthKey = month + "@" + types.String(serverId)
|
var monthKey = month + "@" + types.String(serverId)
|
||||||
|
|
||||||
if !regexputils.YYYYMM.MatchString(month) {
|
if !regexputils.YYYYMM.MatchString(month) {
|
||||||
|
|||||||
Reference in New Issue
Block a user