test callbacks
This commit is contained in:
parent
7a10cf1af0
commit
05a65dd0f3
@ -313,6 +313,11 @@ func MQTGCmdWorker(id int, cmds <-chan TGCommand) {
|
|||||||
func SQLCWMsgWorker(id int, msgs <-chan ChatWarsMessage, objIds chan<- int64) {
|
func SQLCWMsgWorker(id int, msgs <-chan ChatWarsMessage, objIds chan<- int64) {
|
||||||
//log.Printf("SQLCWMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
|
//log.Printf("SQLCWMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
|
||||||
for m := range msgs {
|
for m := range msgs {
|
||||||
|
if len(m.Callbacks) != 0 {
|
||||||
|
for c := range m.Callbacks {
|
||||||
|
log.Printf("SQLCWMsgWorker[%d] (%d) : Callback : %s : %s\n", id, m.ID64, c.name, string(c.data))
|
||||||
|
}
|
||||||
|
}
|
||||||
objId, err := addObjMsg(m.ID64, m.ChatID64, m.TGUserID64, m.TGSenderUserID64, m.Date, m.Text)
|
objId, err := addObjMsg(m.ID64, m.ChatID64, m.TGUserID64, m.TGSenderUserID64, m.Date, m.Text)
|
||||||
logOnError(err, "SQLCWMsgWorker["+strconv.Itoa(id)+"] : Inserting message.")
|
logOnError(err, "SQLCWMsgWorker["+strconv.Itoa(id)+"] : Inserting message.")
|
||||||
if err == nil && objId != 0 {
|
if err == nil && objId != 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user