small improvements (#958)

* small improvements

* fix: return empty iterator if no json present

* use time.Tick

* changes
This commit is contained in:
UUBulb authored and GitHub committed 2025-01-19 21:22:00 +08:00
1 parent c3a03a9003
commit ff4fd31ec4
10 files changed
+34 -34

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ func RecordTransferHourlyUsage() {
if len(txs) == 0 {
return
}
log.Println("NEZHA>> Cron 流量统计入库", len(txs), DB.Create(txs).Error)
log.Printf("NEZHA>> Saved traffic metrics to database. Affected %d row(s), Error: %v", len(txs), DB.Create(txs).Error)
}
// CleanServiceHistory 清理无效或过时的 监控记录 和 流量记录