This commit is contained in:
shoopea 2019-07-31 16:02:29 +08:00
parent 38578a52bb
commit b4082c54f9

View File

@ -77,7 +77,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
for d := range m {
var x ChatWarsMessage
// log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Received a message: %s", string(d.Body))
log.Printf("MQGetMsgWorker["+strconv.Itoa(id)+"] : Received a message: %s", string(d.Body))
err = json.Unmarshal(d.Body, &x)
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+string(d.Body))
if err == nil {
@ -315,7 +315,7 @@ func SQLCWMsgWorker(id int, msgs <-chan ChatWarsMessage, objIds chan<- int64) {
// log.Printf("SQLCWMsgWorker["+strconv.Itoa(id)+"] : Message inserted (%d).\n", objId)
objIds <- objId
} else {
log.Printf("SQLCWMsgWorker["+strconv.Itoa(id)+"] : Message in error\n%s\n", m.Text)
//log.Printf("SQLCWMsgWorker["+strconv.Itoa(id)+"] : Message in error\n%s\n", m.Text)
}
}