(taskType TaskType)
| 56 | } |
| 57 | |
| 58 | func NewTask(taskType TaskType) *BaseTask { |
| 59 | taskId := uuid.Must(uuid.NewV4()).String() |
| 60 | return &BaseTask{ |
| 61 | Id: taskId, |
| 62 | FailureCount: 0, |
| 63 | Type: taskType, |
| 64 | LogLabels: map[string]string{pkg.LogKeyTaskDotID: taskId}, |
| 65 | Props: make(map[string]interface{}), |
| 66 | compactionID: taskId, |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | func (t *BaseTask) deepCopy() *BaseTask { |
| 71 | t.lock.RLock() |