Skip to content

Commit 7c802f5

Browse files
author
yangsen
committed
resume work count
1 parent 46eb0bc commit 7c802f5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

cmd/upload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ var resumeUploadCmdBuilder = func(cfg *iqshell.Config) *cobra.Command {
190190
cmd.Flags().BoolVar(&info.Overwrite, "overwrite", false, "overwrite the file of same key in bucket")
191191
cmd.Flags().Int64VarP(&info.ChunkSize, "v2-part-size", "", data.BLOCK_SIZE, "the part size when use resumable upload v2 APIs to upload, default 4M")
192192
cmd.Flags().IntVarP(&info.FileType, "storage", "s", 0, "set storage type of file, 0:STANDARD storage, 1:IA storage, 2:ARCHIVE storage, 3:DEEP_ARCHIVE storage")
193-
cmd.Flags().IntVarP(&info.ResumeWorkerCount, "worker", "c", 16, "worker count")
193+
cmd.Flags().IntVarP(&info.ResumeWorkerCount, "worker", "c", 3, "worker count")
194194
cmd.Flags().StringVarP(&info.UpHost, "up-host", "u", "", "uphost")
195195
cmd.Flags().StringVarP(&info.Policy.CallbackURL, "callback-urls", "l", "", "upload callback urls, separated by comma")
196196
cmd.Flags().StringVarP(&info.Policy.CallbackHost, "callback-host", "T", "", "upload callback host")

iqshell/storage/object/upload/operations/batch.go

+1
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ func batchUploadFlow(info BatchUpload2Info, uploadConfig UploadConfig, dbPath st
278278
UseResumeV2: uploadConfig.ResumableAPIV2,
279279
ChunkSize: uploadConfig.ResumableAPIV2PartSize,
280280
PutThreshold: uploadConfig.PutThreshold,
281+
ResumeWorkerCount: uploadConfig.WorkerCount,
281282
Progress: nil,
282283
},
283284
RelativePathToSrcPath: fileRelativePath,

iqshell/storage/object/upload/uploader.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ func uploadSource(info *ApiInfo) (*ApiResult, *data.CodeError) {
192192
once.Do(func() {
193193
storage.SetSettings(&storage.Settings{
194194
TaskQsize: 0,
195-
Workers: 0,
195+
Workers: info.ResumeWorkerCount,
196196
ChunkSize: 0,
197197
PartSize: 0,
198-
TryTimes: info.ResumeWorkerCount,
198+
TryTimes: 0,
199199
})
200200
})
201201
storageCfg := workspace.GetStorageConfig()

0 commit comments

Comments
 (0)