Revert "test"

This reverts commit 002c547a50.
This commit is contained in:
shoopea 2019-06-28 15:56:29 +08:00
parent 866ec809c6
commit d0f5426c12

View File

@ -32,16 +32,8 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
err = s.Open()
}
log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Connected to RabbitMQ")
m, err := s.MQChannel.Consume(
s.MQQueue.Name, // queue
"", // consumer
true, // auto-ack
false, // exclusive
false, // no-local
false, // no-wait
nil, // args
)
for d := range m {
for d := range s.MQDelivery {
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))
@ -360,16 +352,7 @@ func MQKeepAliveWorker() {
time.Sleep(15 * time.Second)
err = s.Open()
}
m, err := s.MQChannel.Consume(
s.MQQueue.Name, // queue
"", // consumer
true, // auto-ack
false, // exclusive
false, // no-local
false, // no-wait
nil, // args
)
for d := range m {
for d := range s.MQDelivery {
log.Printf("MQKeepAliveWorker : Received a message: %s", string(d.Body))
x := MQKeepAlive{}
err = json.Unmarshal(d.Body, &x)