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