优化易步硕

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

View File

@ -176,7 +176,7 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
case comm.Rtype25, comm.Rtype30,
comm.Rtype32, comm.Rtype33, comm.Rtype34, comm.Rtype36,
comm.Rtype37, comm.Rtype40,
comm.Rtype46, comm.Rtype76, comm.Rtype79,
comm.Rtype46, comm.Rtype76, comm.Rtype79,
comm.Rtype52, comm.Rtype55, comm.Rtype56, comm.Rtype82,
comm.Rtype65, comm.Rtype66, comm.Rtype67, comm.Rtype68, comm.Rtype70, comm.Rtype140,
comm.Rtype169, comm.Rtype170, comm.Rtype174, comm.Rtype179, comm.Rtype180:
@ -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},