second callbacks review

This commit is contained in:
shoopea 2019-08-17 14:43:26 +08:00
parent f07c33e9c2
commit 5b9f48cae5
2 changed files with 2 additions and 2 deletions

2
job.go
View File

@ -67,7 +67,7 @@ func createJobCallback(jobTypeID int32, userID64 int64, msgTypeID64 int64, paylo
func setJobCallback(jobID64 int64, userID64 int64, msgTypeID64 int64) {
muxCallbacks.Lock()
if _, ok := callbacks[userID64]; !ok {
callbacks[userID64] = make(map[int64][]int)
callbacks[userID64] = make(map[int64][]int64)
}
s := callbacks[userID64][msgTypeID64]
s = append(s, jobID64)

View File

@ -475,7 +475,7 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
err := rescheduleJob(jobID64, objJobStatusNew, time.Now().UTC())
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : callbacks triggering")
}
mc1[msgParsingRules[i].MsgTypeID] = make([]int64)
mc1[msgParsingRules[i].MsgTypeID] = nil
}
}
muxCallbacks.Unlock()