MCPcopy Create free account
hub / github.com/flant/shell-operator / remove

Method remove

pkg/task/queue/task_storage.go:86–93  ·  view source on GitHub ↗

remove removes and returns a task by ID (internal implementation)

(id string)

Source from the content-addressed store, hash-verified

84
85// remove removes and returns a task by ID (internal implementation)
86func (ts *TaskStorage) remove(id string) task.Task {
87 if element, ok := ts.idIndex[id]; ok {
88 t := ts.items.Remove(element)
89 delete(ts.idIndex, id)
90 return t
91 }
92 return nil
93}
94
95// removeElement removes an element from the list and updates the index (internal implementation)
96func (ts *TaskStorage) removeElement(element *list.Element[task.Task]) task.Task {

Callers 2

RemoveMethod · 0.95
ProcessResultMethod · 0.95

Calls 1

RemoveMethod · 0.65

Tested by

no test coverage detected