aa
This commit is contained in:
@@ -370,6 +370,7 @@ func HandleTcpMessages() {
|
|||||||
//一直读?
|
//一直读?
|
||||||
prints, _ := dao.GetPrintMsgs(db, []int{printMsgWait}, time.Now().Add(-time.Hour*3), time.Now(), offset, pageSize)
|
prints, _ := dao.GetPrintMsgs(db, []int{printMsgWait}, time.Now().Add(-time.Hour*3), time.Now(), offset, pageSize)
|
||||||
for _, printMsg := range prints {
|
for _, printMsg := range prints {
|
||||||
|
printMsgChan <- printMsg
|
||||||
printMsg.Status = printMsgAlreadyLoad
|
printMsg.Status = printMsgAlreadyLoad
|
||||||
dao.UpdateEntity(db, printMsg, "Status")
|
dao.UpdateEntity(db, printMsg, "Status")
|
||||||
}
|
}
|
||||||
@@ -382,7 +383,7 @@ func doPrint2(printMsgChan chan *model.PrintMsg) (err error) {
|
|||||||
)
|
)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case printMsg, _ := <-printMsgChan:
|
case printMsg := <-printMsgChan:
|
||||||
var (
|
var (
|
||||||
data []byte
|
data []byte
|
||||||
c net.Conn
|
c net.Conn
|
||||||
|
|||||||
Reference in New Issue
Block a user