test
This commit is contained in:
parent
cd2ee8d3b9
commit
c25a02be3e
5
bot.go
5
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)")
|
||||
|
Loading…
Reference in New Issue
Block a user