test
This commit is contained in:
parent
57f91afe32
commit
d6792bb2a2
33
job.go
33
job.go
@ -20,9 +20,10 @@ func jobRescan(j Job) {
|
||||
if len(ids) > 1 {
|
||||
for _, id := range ids {
|
||||
p := JobPayloadRescanMsg{
|
||||
Query: fmt.Sprintf("SELECT o.id FROM obj o WHERE o.id = %d AND o.obj_type_id = %d AND o.obj_sub_type_id = %d;", id, objTypeMessage, objSubTypeMessageUnknown),
|
||||
Query: fmt.Sprintf("SELECT %id id FROM DUAL;", id),
|
||||
MsgID64: 0,
|
||||
ChatID64: 0,
|
||||
}
|
||||
|
||||
b, _ := json.Marshal(p)
|
||||
err := createJob(objSubTypeJobRescanMsg, objJobPriorityRescanChildMsg, j.UserID64, time.Now(), b)
|
||||
logOnError(err, "jobRescan : createJob(objSubTypeJobRescanMsg)")
|
||||
@ -40,23 +41,27 @@ func jobRescan(j Job) {
|
||||
SQLMsgIdentifyQueue <- ids[0]
|
||||
err = setJobDone(j.ID64)
|
||||
logOnError(err, "jobRescan : setJobDone(1)")
|
||||
m := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: "One message processed.",
|
||||
FromMsgID64: r.MsgID64,
|
||||
FromChatID64: r.ChatID64,
|
||||
if r.MsgID64 != 0 || r.ChatID64 != 0 {
|
||||
m := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: "One message processed.",
|
||||
FromMsgID64: r.MsgID64,
|
||||
FromChatID64: r.ChatID64,
|
||||
}
|
||||
TGCmdQueue <- m
|
||||
}
|
||||
TGCmdQueue <- m
|
||||
} else {
|
||||
err = setJobDone(j.ID64)
|
||||
logOnError(err, "jobRescan : setJobDone(0)")
|
||||
m := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: "No message processed.",
|
||||
FromMsgID64: r.MsgID64,
|
||||
FromChatID64: r.ChatID64,
|
||||
if r.MsgID64 != 0 || r.ChatID64 != 0 {
|
||||
m := TGCommand{
|
||||
Type: commandReplyMsg,
|
||||
Text: "One message processed.",
|
||||
FromMsgID64: r.MsgID64,
|
||||
FromChatID64: r.ChatID64,
|
||||
}
|
||||
TGCmdQueue <- m
|
||||
}
|
||||
TGCmdQueue <- m
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user