MCPcopy Index your code
hub / github.com/apache/devlake / RerunTask

Function RerunTask

backend/server/services/task.go:223–239  ·  view source on GitHub ↗

RerunTask reruns specified task

(taskId uint64)

Source from the content-addressed store, hash-verified

221
222// RerunTask reruns specified task
223func 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
242func GetSubTasksInfo(pipelineId uint64, shouldSanitize bool, tx dal.Dal) (*models.SubTasksOuput, errors.Error) {

Callers

nothing calls this directly

Calls 4

GetTaskFunction · 0.85
RerunPipelineFunction · 0.85
SanitizePluginOptionFunction · 0.85
ConvertMethod · 0.45

Tested by

no test coverage detected