improve transfer record logic (#1033)

* improve transfer record logic

* refactor

* modernize loops

* remove unused type conversions

* update dependencies

* script: keep .gitkeep files

* fix

* remove clear
This commit is contained in:
UUBulb
2025-03-19 22:21:21 +08:00
committed by GitHub
parent 5c252f5e43
commit fa36a36beb
14 changed files with 168 additions and 131 deletions

View File

@@ -35,8 +35,8 @@ type Server struct {
TaskStream pb.NezhaService_RequestTaskServer `gorm:"-" json:"-"`
ConfigCache chan any `gorm:"-" json:"-"`
PrevTransferInSnapshot int64 `gorm:"-" json:"-"` // 上次数据点时的入站使用量
PrevTransferOutSnapshot int64 `gorm:"-" json:"-"` // 上次数据点时的出站使用量
PrevTransferInSnapshot uint64 `gorm:"-" json:"-"` // 上次数据点时的入站使用量
PrevTransferOutSnapshot uint64 `gorm:"-" json:"-"` // 上次数据点时的出站使用量
}
func InitServer(s *Server) {