MCPcopy
hub / github.com/rclone/rclone / PurgeTempUploads

Method PurgeTempUploads

backend/cache/utils_test.go:8–17  ·  view source on GitHub ↗

PurgeTempUploads will remove all the pending uploads from the queue

()

Source from the content-addressed store, hash-verified

6
7// PurgeTempUploads will remove all the pending uploads from the queue
8func (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)
20func (b *Persistent) SetPendingUploadToStarted(remote string) error {

Calls 4

DeleteBucketMethod · 0.80
LockMethod · 0.65
UnlockMethod · 0.65
UpdateMethod · 0.65

Tested by

no test coverage detected