This commit is contained in:
shoopea 2019-05-19 11:02:43 +08:00
parent d3e09278a7
commit bf42f210db
3 changed files with 14 additions and 9 deletions

3
def.go
View File

@ -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

4
job.go
View File

@ -34,6 +34,7 @@ func jobRescan(j Job) {
logOnError(err, "jobRescan : createJob(objSubTypeJobRescanMsg)") logOnError(err, "jobRescan : createJob(objSubTypeJobRescanMsg)")
} }
if j.JobTypeID == objSubTypeJobRescanMsg {
p := JobPayloadSetDone{ p := JobPayloadSetDone{
JobID64: j.ID64, JobID64: j.ID64,
MsgID64: r.MsgID64, MsgID64: r.MsgID64,
@ -41,8 +42,9 @@ func jobRescan(j Job) {
Text: fmt.Sprintf("%d messages processed.", len(ids)), Text: fmt.Sprintf("%d messages processed.", len(ids)),
} }
b, _ := json.Marshal(p) b, _ := json.Marshal(p)
err := createJob(objSubTypeJobSetJobDone, objJobPriority, j.UserID64, time.Now(), b) err := createJob(objSubTypeJobSetJobDone, objJobPriorityRescanAllMsg, j.UserID64, time.Now(), b)
logOnError(err, "jobRescan : createJob(objSubTypeJobSetJobDone)") 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)

View File

@ -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: