Skip to content

Commit

Permalink
fix: fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
flywukong committed Sep 19, 2023
1 parent 7eb10c5 commit 5905819
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cmd/cmd_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@ func uploadFile(bucketName, objectName, filePath, urlInfo string, ctx *cli.Conte
LastPrinted: time.Now(),
}

if objectSize > objectLargerSize {
// if print big file progress, the printing progress should be delayed to obtain a more accurate display.
if objectSize > progressDelayPrintSize {
progressReader.LastPrinted = time.Now().Add(2 * time.Second)
}

Expand Down Expand Up @@ -523,7 +524,7 @@ func uploadFile(bucketName, objectName, filePath, urlInfo string, ctx *cli.Conte
for {
select {
case <-timeout:
return toCmdErr(errors.New("object not sealed after 15 seconds"))
return toCmdErr(errors.New("object not sealed after 1 hour"))
case <-ticker.C:
count++
headObjOutput, queryErr := gnfdClient.HeadObject(c, bucketName, objectName)
Expand Down
6 changes: 3 additions & 3 deletions cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ const (
StatusSPrefix = "STATUS_"
defaultMaxKey = 500

noBalanceErr = "key not found"
maxListMemberNum = 1000
objectLargerSize = 10 * 1024 * 1024
noBalanceErr = "key not found"
maxListMemberNum = 1000
progressDelayPrintSize = 10 * 1024 * 1024
)

var (
Expand Down

0 comments on commit 5905819

Please sign in to comment.