This commit is contained in:
shoopea 2019-05-15 11:24:35 +08:00
parent f072ad7069
commit f58cd1fa30

2
mq.go
View File

@ -83,7 +83,7 @@ func MQReceiveMsgWorker(id int, cmd chan<- ChatWarsCommand) {
failOnError(err, "MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Failed to declare a consumer") failOnError(err, "MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Failed to declare a consumer")
for d := range m { for d := range m {
// log.Printf("MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Received a message: %s", string(d.Body)) log.Printf("MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Received a message: %s", string(d.Body))
err = json.Unmarshal(d.Body, &c) err = json.Unmarshal(d.Body, &c)
logOnError(err, "MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+string(d.Body)) logOnError(err, "MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+string(d.Body))
if err == nil { if err == nil {