AddAfter inserts a task after the task with specified id.
(id string, tasks ...task.Task)
| 652 | |
| 653 | // AddAfter inserts a task after the task with specified id. |
| 654 | func (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. |
| 666 | func (q *TaskQueue) AddBefore(id string, newTask task.Task) { |