PurgeTempUploads will remove all the pending uploads from the queue
()
| 6 | |
| 7 | // PurgeTempUploads will remove all the pending uploads from the queue |
| 8 | func (b *Persistent) PurgeTempUploads() { |
| 9 | b.tempQueueMux.Lock() |
| 10 | defer b.tempQueueMux.Unlock() |
| 11 | |
| 12 | _ = b.db.Update(func(tx *bolt.Tx) error { |
| 13 | _ = tx.DeleteBucket([]byte(tempBucket)) |
| 14 | _, _ = tx.CreateBucketIfNotExists([]byte(tempBucket)) |
| 15 | return nil |
| 16 | }) |
| 17 | } |
| 18 | |
| 19 | // SetPendingUploadToStarted is a way to mark an entry as started (even if it's not already) |
| 20 | func (b *Persistent) SetPendingUploadToStarted(remote string) error { |
no test coverage detected