test
This commit is contained in:
parent
48ff558d59
commit
51102e96d3
@ -14,7 +14,6 @@ import (
|
|||||||
|
|
||||||
func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
||||||
//log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
|
//log.Printf("MQGetMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
|
||||||
var x ChatWarsMessage
|
|
||||||
s := MQSession{
|
s := MQSession{
|
||||||
User: cfg.Rabbit.User,
|
User: cfg.Rabbit.User,
|
||||||
Password: cfg.Rabbit.Password,
|
Password: cfg.Rabbit.Password,
|
||||||
@ -55,6 +54,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
false, // no-wait
|
false, // no-wait
|
||||||
nil, // args
|
nil, // args
|
||||||
)
|
)
|
||||||
|
var x ChatWarsMessage
|
||||||
for d := range m {
|
for d := range m {
|
||||||
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)
|
err = json.Unmarshal(d.Body, &x)
|
||||||
|
Loading…
Reference in New Issue
Block a user