AddBefore inserts a task before the task with specified id.
(id string, newTask task.Task)
| 664 | |
| 665 | // AddBefore inserts a task before the task with specified id. |
| 666 | func (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. |
| 674 | func (q *TaskQueue) Remove(id string) task.Task { |