This commit is contained in:
shoopea 2019-05-18 22:29:48 +08:00
parent 15b04af898
commit fb46d01e59
2 changed files with 15 additions and 11 deletions

8
def.go
View File

@ -212,12 +212,16 @@ const (
objJobPriorityRescanAllMsg = 4
MQGetMsgWorkers = 12
MQCWMsgQueueSize = 100
SQLCWMsgWorkers = 6
SQLIdentifyMsgWorkers = 6
SQLJobWorkers = 3
SQLMsgIdentifyQueueSize = 1000
SQLJobWorkers = 12
TGCmdWorkers = 3
TGCmdQueueSize = 100
MQTGCmdWorkers = 3
SQLJobSliceSize = 25
MQTGCmdQueueSize = 100
SQLJobSliceSize = 250
)
var (

View File

@ -105,10 +105,10 @@ func main() {
}
b.Send(&u, "Bot restarted")
MQCWMsgQueue = make(chan ChatWarsMessage, 100)
SQLMsgIdentifyQueue = make(chan int64, 100)
TGCmdQueue = make(chan TGCommand, 100)
MQTGCmdQueue = make(chan TGCommand, 100)
MQCWMsgQueue = make(chan ChatWarsMessage, MQCWMsgQueueSize)
SQLMsgIdentifyQueue = make(chan int64, SQLMsgIdentifyQueueSize)
TGCmdQueue = make(chan TGCommand, TGCmdQueueSize)
MQTGCmdQueue = make(chan TGCommand, MQTGCmdQueueSize)
clientsQueue = make(map[int64]*MQClient)
clientsKeepAlive = make(map[int64]*MQKeepAlive)