fix: ограничить статистику 7 днями и убрать 30d из дашборда
This commit is contained in:
@@ -72,7 +72,6 @@ func saveAccountTraffic(apiPort int64, trafficStatsSecret string) {
|
||||
|
||||
nowMs := time.Now().UnixMilli()
|
||||
hourStart := nowMs - (nowMs % int64(time.Hour/time.Millisecond))
|
||||
dayStart := nowMs - (nowMs % int64(24*time.Hour/time.Millisecond))
|
||||
|
||||
for key, traffic := range users {
|
||||
rxBytes := traffic.Rx
|
||||
@@ -115,7 +114,6 @@ func saveAccountTraffic(apiPort int64, trafficStatsSecret string) {
|
||||
}
|
||||
|
||||
_ = dao.UpsertTrafficAggregateHourly(*peer.Id, hourStart, rxBytes, txBytes)
|
||||
_ = dao.UpsertTrafficAggregateDaily(*peer.Id, dayStart, rxBytes, txBytes)
|
||||
}
|
||||
}
|
||||
func kickAccount(apiPort int64, trafficStatsSecret string) {
|
||||
|
||||
Reference in New Issue
Block a user