test
This commit is contained in:
parent
324b0ae8c7
commit
29972a9e8f
18
job.go
18
job.go
@ -29,8 +29,8 @@ func jobRescan(j Job) {
|
|||||||
}
|
}
|
||||||
p := JobPayloadSetDone{
|
p := JobPayloadSetDone{
|
||||||
JobID64: j.ID64,
|
JobID64: j.ID64,
|
||||||
MsgID64: j.MsgID64,
|
MsgID64: r.MsgID64,
|
||||||
ChatID64: j.ChatID64,
|
ChatID64: r.ChatID64,
|
||||||
Text: fmt.Sprintf("%d messages processed.", len(ids)),
|
Text: fmt.Sprintf("%d messages processed.", len(ids)),
|
||||||
}
|
}
|
||||||
b, _ := json.Marshal(p)
|
b, _ := json.Marshal(p)
|
||||||
@ -44,7 +44,7 @@ func jobRescan(j Job) {
|
|||||||
Type: commandReplyMsg,
|
Type: commandReplyMsg,
|
||||||
Text: "One message processed.",
|
Text: "One message processed.",
|
||||||
FromMsgID64: j.MsgID64,
|
FromMsgID64: j.MsgID64,
|
||||||
FromChatID64j.ChatID64,
|
FromChatID64: r.ChatID64,
|
||||||
}
|
}
|
||||||
TGCmdQueue <- m
|
TGCmdQueue <- m
|
||||||
} else {
|
} else {
|
||||||
@ -53,8 +53,8 @@ func jobRescan(j Job) {
|
|||||||
m := TGCommand{
|
m := TGCommand{
|
||||||
Type: commandReplyMsg,
|
Type: commandReplyMsg,
|
||||||
Text: "No message processed.",
|
Text: "No message processed.",
|
||||||
FromMsgID64: j.MsgID64,
|
FromMsgID64: r.MsgID64,
|
||||||
FromChatID64j.ChatID64,
|
FromChatID64: r.ChatID64,
|
||||||
}
|
}
|
||||||
TGCmdQueue <- m
|
TGCmdQueue <- m
|
||||||
}
|
}
|
||||||
@ -76,5 +76,13 @@ func jobSetDone(j Job) {
|
|||||||
err = setJobDone(j.ID64)
|
err = setJobDone(j.ID64)
|
||||||
logOnError(err, "jobSetDone : setJobDone")
|
logOnError(err, "jobSetDone : setJobDone")
|
||||||
|
|
||||||
|
m := TGCommand{
|
||||||
|
Type: commandReplyMsg,
|
||||||
|
Text: r.Text,
|
||||||
|
FromMsgID64: r.MsgID64,
|
||||||
|
FromChatID64: r.ChatID64,
|
||||||
|
}
|
||||||
|
TGCmdQueue <- m
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user