This commit is contained in:
suyl
2021-07-22 14:58:41 +08:00
parent 1d048d11f3
commit 5190e42002

View File

@@ -111,8 +111,8 @@ var (
regexpQrr = regexp.MustCompile(byteSignQrRight + "(.*?)" + byteSignQrRightE) regexpQrr = regexp.MustCompile(byteSignQrRight + "(.*?)" + byteSignQrRightE)
regexpSound = regexp.MustCompile(byteSignSound + "(.*?)" + byteSignSoundE) regexpSound = regexp.MustCompile(byteSignSound + "(.*?)" + byteSignSoundE)
printMsgChan = make(chan *model.PrintMsg) printMsgChan = make(chan *model.PrintMsg, 1024)
printMsgCallbackChan = make(chan string) printMsgCallbackChan = make(chan string, 1024)
printMsgChanFail = make(chan *model.PrintMsg) printMsgChanFail = make(chan *model.PrintMsg)
) )
@@ -370,9 +370,9 @@ 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")
} }
} }
} }