chirpnest/workers.go
2019-05-05 19:29:28 +08:00

30 lines
659 B
Go

package main
import (
"log"
"strconv"
)
func SQLCWMsgWorker(id int, msgs <-chan ChatWarsMessage) {
log.Printf("SQLCWMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
for m := range msgs {
objId, err := putUnprocessedMsg(m)
if err != nil {
logOnError(err, "SQLCWMsgWorker["+strconv.Itoa(id)+"] : Inserting message.")
} else {
}
}
log.Printf("SQLCWMsgWorker[" + strconv.Itoa(id) + "] : Closing.")
}
func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
log.Printf("SQLIdentifyMsgWorker[" + strconv.Itoa(id) + "] : Starting.")
for objId := range objIds {
}
log.Printf("SQLIdentifyMsgWorker[" + strconv.Itoa(id) + "] : Closing.")
}