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

Function GetTask

backend/server/services/task.go:155–165  ·  view source on GitHub ↗

GetTask FIXME ...

(taskId uint64)

Source from the content-addressed store, hash-verified

153
154// GetTask FIXME ...
155func GetTask(taskId uint64) (*models.Task, errors.Error) {
156 task := &models.Task{}
157 err := db.First(task, dal.Where("id = ?", taskId))
158 if err != nil {
159 if db.IsErrorNotFound(err) {
160 return nil, errors.NotFound.New("task not found")
161 }
162 return nil, errors.Internal.Wrap(err, "error getting the task from database")
163 }
164 return task, nil
165}
166
167// CancelTask FIXME ...
168func CancelTask(taskId uint64) errors.Error {

Callers 1

RerunTaskFunction · 0.85

Calls 4

WrapMethod · 0.80
FirstMethod · 0.65
IsErrorNotFoundMethod · 0.65
NewMethod · 0.65

Tested by

no test coverage detected