diff --git a/business/jxutils/tasksch/task.go b/business/jxutils/tasksch/task.go index 7ae09d9c2..08c24cbd3 100644 --- a/business/jxutils/tasksch/task.go +++ b/business/jxutils/tasksch/task.go @@ -36,6 +36,7 @@ type ITask interface { GetFinishedJobCount() int GetStatus() int GetCreatedAt() time.Time + GetCreatedBy() string AddChild(task ITask) ITask GetChildren() TaskList @@ -146,12 +147,13 @@ func (t *BaseTask) GetResult(duration time.Duration) (retVal []interface{}, err } func (t *BaseTask) GetCreatedAt() time.Time { - t.locker.RLock() - defer t.locker.RUnlock() - return t.CreatedAt } +func (t *BaseTask) GetCreatedBy() string { + return t.CreatedBy +} + func (t *BaseTask) Cancel() { t.locker.Lock() if t.Status < TaskStatusEndBegin && t.Status != TaskStatusCanceling {