优化易步硕

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

View File

@ -249,13 +249,6 @@ func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType com
return 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) record := this.modelRtaskRecord.getRecord(uid)
handles = this.getHandle(rtaskType) handles = this.getHandle(rtaskType)
@ -372,6 +365,12 @@ func (this *ModuleRtask) TriggerTask(uid string, taskParams ...*comm.TaskParam)
this.Debug("任务触发", this.Debug("任务触发",
log.Field{Key: "uid", Value: uid}, log.Field{Key: "uid", Value: uid},
log.Field{Key: "tasks", Value: taskParams}) 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 { for _, tp := range taskParams {
// this.Debug("任务触发", // this.Debug("任务触发",
// log.Field{Key: "uid", Value: uid}, // log.Field{Key: "uid", Value: uid},