```
feat(common): 添加GlowFilter的Level字段 添加了GlowFilter结构体中的Level字段,用于表示等级信息, 对应JSON标签为"level,omitempty" --- fix(utils): 修复concurrent_swiss_map中的panic处理 - 使用goroutine替代线程池来监听通道 - 添加panic恢复机制,当发生panic时记录错误日志 - 确保在异常情况下程序能够
This commit is contained in:
@@ -71,9 +71,15 @@ func NewServerService() *ServerService {
|
||||
cf.manager = storage.NewBucketManager(mac, &cfg)
|
||||
return cf
|
||||
}
|
||||
func (s *ServerService) GetPort() gdb.List {
|
||||
func (s *ServerService) GetPort(isdebug int) gdb.List {
|
||||
var res gdb.Result
|
||||
if isdebug == 1 {
|
||||
res, _ = cool.DBM(s.Model).Where("is_open", 1).Fields("ip", "port", "online_id", "is_vip", "name").All()
|
||||
|
||||
res, _ := cool.DBM(s.Model).Where("is_open", 1).Fields("ip", "port", "online_id", "is_vip", "name").All()
|
||||
} else {
|
||||
res, _ = cool.DBM(s.Model).Where("is_open", 1).Where("is_debug", 0).Fields("ip", "port", "online_id", "is_vip", "name").All()
|
||||
|
||||
}
|
||||
|
||||
return res.List()
|
||||
|
||||
@@ -85,16 +91,17 @@ func (s *ServerService) GetServer() []model.ServerList {
|
||||
return item
|
||||
|
||||
}
|
||||
func (s *ServerService) StartUPdate(OnlineID uint16) model.ServerList {
|
||||
func (s *ServerService) StartUPdate(OnlineID uint16, isinstall int) model.ServerList {
|
||||
|
||||
m := cool.DBM(s.Model).Where("online_id", OnlineID)
|
||||
|
||||
var tttt model.ServerList
|
||||
m.Scan(&tttt)
|
||||
if isinstall == 1 {
|
||||
tttt.IsOpen = uint8(0)
|
||||
m.Save(tttt)
|
||||
}
|
||||
|
||||
tttt.IsOpen = 0
|
||||
|
||||
m.Save(tttt)
|
||||
// s.CleanCache()
|
||||
return tttt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user