This commit is contained in:
shoopea 2019-05-16 11:11:56 +08:00
parent 32975f75ad
commit acfea25834
2 changed files with 1 additions and 8 deletions

4
job.go
View File

@ -17,8 +17,6 @@ func jobRescan(j Job) {
ids := getSQLListID64(r.Query) ids := getSQLListID64(r.Query)
fmt.Printf("jobRescan : init : len(ids) = %d\n", len(ids))
if len(ids) > 1 { if len(ids) > 1 {
for _, id := range ids { for _, id := range ids {
p := JobPayloadRescanMsg{ p := JobPayloadRescanMsg{
@ -58,7 +56,7 @@ func jobRescan(j Job) {
if r.MsgID64 != 0 || r.ChatID64 != 0 { if r.MsgID64 != 0 || r.ChatID64 != 0 {
m := TGCommand{ m := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,
Text: "One message processed.", Text: "No message processed.",
FromMsgID64: r.MsgID64, FromMsgID64: r.MsgID64,
FromChatID64: r.ChatID64, FromChatID64: r.ChatID64,
} }

5
sql.go
View File

@ -1753,8 +1753,6 @@ func getSQLListID64(q string) []int64 {
ids []int64 ids []int64
) )
fmt.Printf("getSQLListID64 : init : len(ids) = %d\n", len(ids))
rows, err := db.Query(q) rows, err := db.Query(q)
s := fmt.Sprintf("getSQLListID64 : Query(%s)", q) s := fmt.Sprintf("getSQLListID64 : Query(%s)", q)
logOnError(err, s) logOnError(err, s)
@ -1763,13 +1761,10 @@ func getSQLListID64(q string) []int64 {
err = rows.Scan(&id) err = rows.Scan(&id)
logOnError(err, "getSQLListID64 : scan next val") logOnError(err, "getSQLListID64 : scan next val")
ids = append(ids, id) ids = append(ids, id)
fmt.Printf("getSQLListID64 : append : len(ids) = %d\n", len(ids))
} }
err = rows.Err() err = rows.Err()
logOnError(err, "getSQLListID64 : query end") logOnError(err, "getSQLListID64 : query end")
rows.Close() rows.Close()
fmt.Printf("getSQLListID64 : done : len(ids) = %d\n", len(ids))
return ids return ids
} }