test
This commit is contained in:
parent
d3e09278a7
commit
bf42f210db
3
def.go
3
def.go
@ -193,7 +193,8 @@ const (
|
||||
objSubTypeJobWithdrawal = 604
|
||||
objSubTypeJobGStock = 605
|
||||
objSubTypeJobRescanMsg = 606
|
||||
objSubTypeJobSetJobDone = 607
|
||||
objSubTypeJobRescanMsgChild = 607
|
||||
objSubTypeJobSetJobDone = 608
|
||||
objSubTypeItemResource = 701
|
||||
objSubTypeItemAlch = 702
|
||||
objSubTypeItemMisc = 703
|
||||
|
18
job.go
18
job.go
@ -34,15 +34,17 @@ func jobRescan(j Job) {
|
||||
logOnError(err, "jobRescan : createJob(objSubTypeJobRescanMsg)")
|
||||
}
|
||||
|
||||
p := JobPayloadSetDone{
|
||||
JobID64: j.ID64,
|
||||
MsgID64: r.MsgID64,
|
||||
ChatID64: r.ChatID64,
|
||||
Text: fmt.Sprintf("%d messages processed.", len(ids)),
|
||||
if j.JobTypeID == objSubTypeJobRescanMsg {
|
||||
p := JobPayloadSetDone{
|
||||
JobID64: j.ID64,
|
||||
MsgID64: r.MsgID64,
|
||||
ChatID64: r.ChatID64,
|
||||
Text: fmt.Sprintf("%d messages processed.", len(ids)),
|
||||
}
|
||||
b, _ := json.Marshal(p)
|
||||
err := createJob(objSubTypeJobSetJobDone, objJobPriorityRescanAllMsg, j.UserID64, time.Now(), b)
|
||||
logOnError(err, "jobRescan : createJob(objSubTypeJobSetJobDone)")
|
||||
}
|
||||
b, _ := json.Marshal(p)
|
||||
err := createJob(objSubTypeJobSetJobDone, objJobPriority, j.UserID64, time.Now(), b)
|
||||
logOnError(err, "jobRescan : createJob(objSubTypeJobSetJobDone)")
|
||||
} else if len(ids) == 1 {
|
||||
SQLMsgIdentifyQueue <- ids[0]
|
||||
err = setJobDone(j.ID64)
|
||||
|
@ -207,6 +207,8 @@ func SQLJobWorker(id int) {
|
||||
switch j.JobTypeID {
|
||||
case objSubTypeJobRescanMsg:
|
||||
jobRescan(j)
|
||||
case objSubTypeJobRescanMsgChild:
|
||||
jobRescan(j)
|
||||
case objSubTypeJobSetJobDone:
|
||||
jobSetDone(j)
|
||||
case objSubTypeJobPillage:
|
||||
|
Loading…
Reference in New Issue
Block a user