This commit is contained in:
shoopea 2019-06-11 11:09:30 +08:00
parent 73c8b79fd5
commit 76a4bbdaba

2
mq.go
View File

@ -82,7 +82,7 @@ func MQReceiveMsgWorker(id int, cmd chan<- TGCommand) {
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:\n %s", string(d.Body)) log.Printf("MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Received a message:\n %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 {