This commit is contained in:
shoopea 2019-05-19 10:55:34 +08:00
parent 96bf2b8de7
commit d3e09278a7

4
job.go
View File

@ -21,9 +21,9 @@ func jobRescan(j Job) {
for i := 1; i <= (len(ids)/SQLMsgRescanJobSize)+1; i++ { for i := 1; i <= (len(ids)/SQLMsgRescanJobSize)+1; i++ {
var s string var s string
for _, id := range ids[((i - 1) * SQLMsgRescanJobSize):(i*SQLMsgRescanJobSize - 1)] { for _, id := range ids[((i - 1) * SQLMsgRescanJobSize):(i*SQLMsgRescanJobSize - 1)] {
s = s + fmp.Sprintf("SELECT %d id FROM DUAL UNION\n", id) s = s + fmt.Sprintf("SELECT %d id FROM DUAL UNION\n", id)
} }
s = s + fmp.Sprintf("SELECT 0 id FROM DUAL WHERE 1 = 2;", id) s = s + `SELECT 0 id FROM DUAL WHERE 1 = 2;`
p := JobPayloadRescanMsg{ p := JobPayloadRescanMsg{
Query: s, Query: s,
MsgID64: 0, MsgID64: 0,