From c25a02be3e92a5f25f1e7d47ee1b688aecec1c48 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 11 May 2019 11:19:45 +0800 Subject: [PATCH] test --- bot.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bot.go b/bot.go index 9210331..86b44e8 100644 --- a/bot.go +++ b/bot.go @@ -5,7 +5,6 @@ import ( "fmt" tb "gopkg.in/tucnak/telebot.v2" "regexp" - "strconv" "time" ) @@ -96,7 +95,7 @@ func botMsgRescan(m *tb.Message) (string, error) { r := regexp.MustCompile("^[0-9]+$") if r.MatchString(m.Payload) { p := JobPayloadRescanMsg{} - fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.id = %d and o.obj_type_id = %d and o.obj_sub_type_id = %d;", m.Payload, objTypeMessage, objSubTypeMessageUnprocessed) + fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.id = %d and o.obj_type_id = %d and o.obj_sub_type_id = %d;", m.Payload, objTypeMessage, objSubTypeMessageUnknown) b, _ := json.Marshal(p) err := createJob(objSubTypeJobRescanMsg, 2, time.Now(), b) logOnError(err, "botMsgRescan : createJob(objSubTypeJobRescanMsg)") @@ -110,7 +109,7 @@ func botMsgRescan(m *tb.Message) (string, error) { r = regexp.MustCompile("^all$") if r.MatchString(m.Payload) { p := JobPayloadRescanMsg{} - fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.obj_type_id = %d and o.obj_sub_type_id = %d;", objTypeMessage, objSubTypeMessageUnprocessed) + fmt.Sprintf(p.Query, "SELECT o.id from obj o where o.obj_type_id = %d and o.obj_sub_type_id = %d;", objTypeMessage, objSubTypeMessageUnknown) b, _ := json.Marshal(p) err := createJob(objSubTypeJobRescanMsg, 3, time.Now(), b) logOnError(err, "botMsgRescan : createJob(objSubTypeJobRescanMsg)")