"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
dropbox: remove unused code (fixes issue reported by the unused linter)
albertonya1a8c21c709c
diff --git a/backend/dropbox/batcher.go b/backend/dropbox/batcher.goindex 82a4b5524..f6fd1ad27 100644--- a/backend/dropbox/batcher.go+++ b/backend/dropbox/batcher.go@@ -13,7 +13,6 @@ import ("sync""time"- "github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/async""github.com/dropbox/dropbox-sdk-go-unofficial/v6/dropbox/files""github.com/rclone/rclone/fs""github.com/rclone/rclone/fs/fserrors"@@ -140,49 +139,6 @@ func (b *batcher) finishBatch(ctx context.Context, items []*files.UploadSessionFreturn complete, nil}-// finishBatchJobStatus waits for the batch to complete returning completed entries-func (b *batcher) finishBatchJobStatus(ctx context.Context, launchBatchStatus *files.UploadSessionFinishBatchLaunch) (complete *files.UploadSessionFinishBatchResult, err error) {- if launchBatchStatus.AsyncJobId == "" {- return nil, errors.New("wait for batch completion: empty job ID")- }- var batchStatus *files.UploadSessionFinishBatchJobStatus- sleepTime := 100 * time.Millisecond- const maxSleepTime = 1 * time.Second- startTime := time.Now()- try := 1- for {- remaining := time.Duration(b.f.opt.BatchCommitTimeout) - time.Since(startTime)- if remaining < 0 {- break- }- err = b.f.pacer.Call(func() (bool, error) {- batchStatus, err = b.f.srv.UploadSessionFinishBatchCheck(&async.PollArg{- AsyncJobId: launchBatchStatus.AsyncJobId,- })- return shouldRetry(ctx, err)- })- if err != nil {- fs.Debugf(b.f, "Wait for batch: sleeping for %v after error: %v: try %d remaining %v", sleepTime, err, try, remaining)- } else {- if batchStatus.Tag == "complete" {- fs.Debugf(b.f, "Upload batch completed in %v", time.Since(startTime))- return batchStatus.Complete, nil- }- fs.Debugf(b.f, "Wait for batch: sleeping for %v after status: %q: try %d remaining %v", sleepTime, batchStatus.Tag, try, remaining)- }- time.Sleep(sleepTime)- sleepTime *= 2- if sleepTime > maxSleepTime {- sleepTime = maxSleepTime- }- try++- }- if err == nil {- err = errors.New("batch didn't complete")- }- return nil, fmt.Errorf("wait for batch failed after %d tries in %v: %w", try, time.Since(startTime), err)-}-// commit a batchfunc (b *batcher) commitBatch(ctx context.Context, items []*files.UploadSessionFinishArg, results []chan<- batcherResponse) (err error) {// If commit fails then signal clients if sync