- GetCreatedBy for ITask
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user