RerunTask reruns specified task
(taskId uint64)
| 221 | |
| 222 | // RerunTask reruns specified task |
| 223 | func RerunTask(taskId uint64) (*models.Task, errors.Error) { |
| 224 | task, err := GetTask(taskId) |
| 225 | if err != nil { |
| 226 | return nil, err |
| 227 | } |
| 228 | rerunTasks, err := RerunPipeline(task.PipelineId, task) |
| 229 | if err != nil { |
| 230 | return nil, err |
| 231 | } |
| 232 | rerunTask := rerunTasks[0] |
| 233 | taskOption, sanitizePluginOptionErr := SanitizePluginOption(rerunTask.Plugin, rerunTask.Options) |
| 234 | if sanitizePluginOptionErr != nil { |
| 235 | return nil, errors.Convert(err) |
| 236 | } |
| 237 | rerunTask.Options = taskOption |
| 238 | return rerunTask, nil |
| 239 | } |
| 240 | |
| 241 | // GetSubTasksInfo returns subtask list of the pipeline, only the most recently subtasks would be returned |
| 242 | func GetSubTasksInfo(pipelineId uint64, shouldSanitize bool, tx dal.Dal) (*models.SubTasksOuput, errors.Error) { |
nothing calls this directly
no test coverage detected