mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-03 21:26:35 +08:00
refactor: machine包调整
This commit is contained in:
@@ -2,7 +2,7 @@ package mgm
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/common/consts"
|
||||
"mayfly-go/internal/machine/infrastructure/machine"
|
||||
"mayfly-go/internal/machine/mcm"
|
||||
"mayfly-go/pkg/cache"
|
||||
"mayfly-go/pkg/logx"
|
||||
"sync"
|
||||
@@ -18,7 +18,7 @@ var connCache = cache.NewTimedCache(consts.MongoConnExpireTime, 5*time.Second).
|
||||
})
|
||||
|
||||
func init() {
|
||||
machine.AddCheckSshTunnelMachineUseFunc(func(machineId int) bool {
|
||||
mcm.AddCheckSshTunnelMachineUseFunc(func(machineId int) bool {
|
||||
// 遍历所有mongo连接实例,若存在redis实例使用该ssh隧道机器,则返回true,表示还在使用中...
|
||||
items := connCache.Items()
|
||||
for _, v := range items {
|
||||
|
||||
Reference in New Issue
Block a user