(file string)
| 68 | } |
| 69 | |
| 70 | func (q *jobQueue) Done(file string) { |
| 71 | q.mut.Lock() |
| 72 | defer q.mut.Unlock() |
| 73 | |
| 74 | for i := range q.progress { |
| 75 | if q.progress[i] == file { |
| 76 | copy(q.progress[i:], q.progress[i+1:]) |
| 77 | q.progress = q.progress[:len(q.progress)-1] |
| 78 | return |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | // Jobs returns a paginated list of file currently being pulled and files queued |
| 84 | // to be pulled. It also returns how many items were skipped. |