test
This commit is contained in:
parent
38578a52bb
commit
b4082c54f9
@ -77,7 +77,7 @@ func MQGetMsgWorker(id int, msgs chan<- ChatWarsMessage) {
|
|||||||
|
|
||||||
for d := range m {
|
for d := range m {
|
||||||
var x ChatWarsMessage
|
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)
|
err = json.Unmarshal(d.Body, &x)
|
||||||
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+string(d.Body))
|
logOnError(err, "MQGetMsgWorker["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+string(d.Body))
|
||||||
if err == nil {
|
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)
|
// log.Printf("SQLCWMsgWorker["+strconv.Itoa(id)+"] : Message inserted (%d).\n", objId)
|
||||||
objIds <- objId
|
objIds <- objId
|
||||||
} else {
|
} 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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user