优化易步硕

This commit is contained in:
liwei1dao 2023-05-25 20:00:14 +08:00
parent 3b81ee322d
commit 61dd85b752

View File

@ -187,7 +187,7 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
}
handles = append(handles, handle)
this.registerVerifyHandle(v.Id, handle)
case comm.Rtype73, comm.Rtype77,comm.Rtype80, comm.Rtype83:
case comm.Rtype73, comm.Rtype77, comm.Rtype80, comm.Rtype83:
handle := &rtaskCondHandle{
condId: v.Id,
verify: this.modelRtaskRecord.verifyThirdGreatEqualParam,
@ -249,13 +249,6 @@ func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType com
return
}
lock, _ := this.modelRtask.userlock(uid)
err := lock.Lock()
if err != nil {
this.Error("TriggerTask userlock err!", log.Field{Key: "err", Value: err.Error()})
}
defer lock.Unlock()
record := this.modelRtaskRecord.getRecord(uid)
handles = this.getHandle(rtaskType)
@ -372,6 +365,12 @@ func (this *ModuleRtask) TriggerTask(uid string, taskParams ...*comm.TaskParam)
this.Debug("任务触发",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "tasks", Value: taskParams})
lock, _ := this.modelRtask.userlock(uid)
err := lock.Lock()
if err != nil {
this.Error("TriggerTask userlock err!", log.Field{Key: "err", Value: err.Error()})
}
defer lock.Unlock()
for _, tp := range taskParams {
// this.Debug("任务触发",
// log.Field{Key: "uid", Value: uid},