Remove removes and returns a task by ID
(id string)
| 183 | |
| 184 | // Remove removes and returns a task by ID |
| 185 | func (ts *TaskStorage) Remove(id string) task.Task { |
| 186 | ts.mu.Lock() |
| 187 | defer ts.mu.Unlock() |
| 188 | |
| 189 | return ts.remove(id) |
| 190 | } |
| 191 | |
| 192 | // GetSnapshot returns a copy of all tasks in the queue |
| 193 | func (ts *TaskStorage) GetSnapshot() []task.Task { |