aboutsummaryrefslogtreecommitdiff
path: root/weed/command/upload.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-02-17 20:55:55 -0800
committerChris Lu <chris.lu@gmail.com>2021-02-17 20:55:55 -0800
commit6daa932f5c1571cc60cf89014cf17810d756dd6b (patch)
treea6c6fce133c0178efec6324c708f3371dcd4f180 /weed/command/upload.go
parentdd9f3a01049bef33046d3728d82b25b67b8533ac (diff)
downloadseaweedfs-6daa932f5c1571cc60cf89014cf17810d756dd6b.tar.xz
seaweedfs-6daa932f5c1571cc60cf89014cf17810d756dd6b.zip
refactoring to get master function, instead of passing master values directly
this will enable retrying later
Diffstat (limited to 'weed/command/upload.go')
-rw-r--r--weed/command/upload.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/upload.go b/weed/command/upload.go
index 85d6e5c09..effcf8836 100644
--- a/weed/command/upload.go
+++ b/weed/command/upload.go
@@ -96,7 +96,7 @@ func runUpload(cmd *Command, args []string) bool {
if e != nil {
return e
}
- results, e := operation.SubmitFiles(*upload.master, grpcDialOption, parts, *upload.replication, *upload.collection, *upload.dataCenter, *upload.ttl, *upload.diskType, *upload.maxMB, *upload.usePublicUrl)
+ results, e := operation.SubmitFiles(func()string {return *upload.master}, grpcDialOption, parts, *upload.replication, *upload.collection, *upload.dataCenter, *upload.ttl, *upload.diskType, *upload.maxMB, *upload.usePublicUrl)
bytes, _ := json.Marshal(results)
fmt.Println(string(bytes))
if e != nil {
@@ -113,7 +113,7 @@ func runUpload(cmd *Command, args []string) bool {
if e != nil {
fmt.Println(e.Error())
}
- results, _ := operation.SubmitFiles(*upload.master, grpcDialOption, parts, *upload.replication, *upload.collection, *upload.dataCenter, *upload.ttl, *upload.diskType, *upload.maxMB, *upload.usePublicUrl)
+ results, _ := operation.SubmitFiles(func()string {return *upload.master}, grpcDialOption, parts, *upload.replication, *upload.collection, *upload.dataCenter, *upload.ttl, *upload.diskType, *upload.maxMB, *upload.usePublicUrl)
bytes, _ := json.Marshal(results)
fmt.Println(string(bytes))
}