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

Method AddAfter

pkg/task/queue/task_queue.go:654–663  ·  view source on GitHub ↗

AddAfter inserts a task after the task with specified id.

(id string, tasks ...task.Task)

Source from the content-addressed store, hash-verified

652
653// AddAfter inserts a task after the task with specified id.
654func (q *TaskQueue) AddAfter(id string, tasks ...task.Task) {
655 defer q.MeasureActionTime("AddAfter")()
656
657 q.storage.AddAfter(id, tasks...)
658
659 // Update queueTasksCounter for each added task
660 for _, t := range tasks {
661 q.queueTasksCounter.Add(t)
662 }
663}
664
665// AddBefore inserts a task before the task with specified id.
666func (q *TaskQueue) AddBefore(id string, newTask task.Task) {

Calls 2

MeasureActionTimeMethod · 0.95
AddMethod · 0.65