aa
This commit is contained in:
@@ -373,10 +373,15 @@ 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
|
printMsgChan <- printMsg
|
||||||
//select {
|
Loop:
|
||||||
//case data, _ := <-printMsgCallbackChan:
|
for {
|
||||||
// changePrintMsg(data)
|
select {
|
||||||
//}
|
case data, _ := <-printMsgCallbackChan:
|
||||||
|
changePrintMsg(data)
|
||||||
|
default:
|
||||||
|
break Loop
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -386,10 +391,6 @@ func doPrint2(printMsgChan chan *model.PrintMsg) (err error) {
|
|||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
for {
|
for {
|
||||||
select {
|
|
||||||
case data, _ := <-printMsgCallbackChan:
|
|
||||||
changePrintMsg(data)
|
|
||||||
default:
|
|
||||||
select {
|
select {
|
||||||
case printMsg, _ := <-printMsgChan:
|
case printMsg, _ := <-printMsgChan:
|
||||||
var (
|
var (
|
||||||
@@ -439,7 +440,6 @@ func doPrint2(printMsgChan chan *model.PrintMsg) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user