feat: 离线License批量删除;同步循环加固(启动即跑/pending自动握手/防重入/panic恢复,移至main启动);同步时间显示到秒
This commit is contained in:
1 parent
30b87dec62
commit
252ae14aef
5 files changed
+79
-11
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"backend/config"
|
||||
"backend/database"
|
||||
licenseservice "backend/internal/service/license"
|
||||
syncservice "backend/internal/service/sync"
|
||||
"backend/router"
|
||||
"context"
|
||||
"log"
|
||||
@@ -27,6 +28,9 @@ func main() {
|
||||
// 启动在线状态清扫(超时未心跳的激活记录置为离线) // Logan.Li
|
||||
licenseservice.StartOnlineSweeper(db, cfg.OnlineTTLMinutes)
|
||||
|
||||
// 启动节点定时双向同步(宽松节奏,默认 10 分钟) // Logan.Li
|
||||
syncservice.NewService(db, cfg).StartSyncLoop(cfg.SyncIntervalMinutes)
|
||||
|
||||
// 初始化路由 // Logan.Li
|
||||
r := router.SetupRouter(db, cfg)
|
||||
|
||||
|
||||
Reference in new issue
Block a user