Merge branch 'refs/heads/feat-cid-run-list' into release

This commit is contained in:
junleea 2025-10-03 21:13:08 +08:00
commit 76b6ec7d74
1 changed files with 2 additions and 2 deletions

View File

@ -240,11 +240,11 @@ func GetDBTableDesc(req *proto.GetDBTableDescReq, userId int) (*proto.SQLResult,
func DelDBMMap() { func DelDBMMap() {
dao.DBMMapRWMutex.Lock() dao.DBMMapRWMutex.Lock()
defer dao.DBMMapRWMutex.Unlock()
cur := worker.GetCurrentTimestamp() cur := worker.GetCurrentTimestamp()
for k, v := range dao.DBMMap { for k, v := range dao.DBMMap {
if cur-v.LastUserTime < proto.DBMMap_Max_Keep_Time { if (cur - v.LastUserTime) > proto.DBMMap_Max_Keep_Time {
delete(dao.DBMMap, k) //删除 delete(dao.DBMMap, k) //删除
} }
} }
dao.DBMMapRWMutex.Unlock()
} }