MCPcopy Index your code
hub / github.com/flant/shell-operator / AddBefore

Method AddBefore

pkg/task/queue/task_queue.go:666–671  ·  view source on GitHub ↗

AddBefore inserts a task before the task with specified id.

(id string, newTask task.Task)

Source from the content-addressed store, hash-verified

664
665// AddBefore inserts a task before the task with specified id.
666func (q *TaskQueue) AddBefore(id string, newTask task.Task) {
667 defer q.MeasureActionTime("AddBefore")()
668
669 q.storage.AddBefore(id, newTask)
670 q.queueTasksCounter.Add(newTask)
671}
672
673// Remove finds element by id and deletes it.
674func (q *TaskQueue) Remove(id string) task.Task {

Calls 2

MeasureActionTimeMethod · 0.95
AddMethod · 0.65