MCPcopy
hub / github.com/rclone/rclone / removePendingUpload

Method removePendingUpload

backend/cache/storage_persistent.go:918–929  ·  view source on GitHub ↗
(remote string)

Source from the content-addressed store, hash-verified

916}
917
918func (b *Persistent) removePendingUpload(remote string) error {
919 b.tempQueueMux.Lock()
920 defer b.tempQueueMux.Unlock()
921
922 return b.db.Update(func(tx *bolt.Tx) error {
923 bucket, err := tx.CreateBucketIfNotExists([]byte(tempBucket))
924 if err != nil {
925 return fmt.Errorf("couldn't bucket for %v", tempBucket)
926 }
927 return bucket.Delete([]byte(remote))
928 })
929}
930
931// updatePendingUpload allows to update an existing item in the queue while checking if it's not started in the same
932// transaction. If it is started, it will not allow the update

Callers 2

runMethod · 0.80
RemoveMethod · 0.80

Calls 5

LockMethod · 0.65
UnlockMethod · 0.65
UpdateMethod · 0.65
DeleteMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected