diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-02-17 20:55:55 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-02-17 20:55:55 -0800 |
| commit | 6daa932f5c1571cc60cf89014cf17810d756dd6b (patch) | |
| tree | a6c6fce133c0178efec6324c708f3371dcd4f180 /weed/operation/delete_content.go | |
| parent | dd9f3a01049bef33046d3728d82b25b67b8533ac (diff) | |
| download | seaweedfs-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/operation/delete_content.go')
| -rw-r--r-- | weed/operation/delete_content.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/operation/delete_content.go b/weed/operation/delete_content.go index 65baaddf2..8f87882b1 100644 --- a/weed/operation/delete_content.go +++ b/weed/operation/delete_content.go @@ -28,10 +28,10 @@ func ParseFileId(fid string) (vid string, key_cookie string, err error) { } // DeleteFiles batch deletes a list of fileIds -func DeleteFiles(master string, usePublicUrl bool, grpcDialOption grpc.DialOption, fileIds []string) ([]*volume_server_pb.DeleteResult, error) { +func DeleteFiles(masterFn GetMasterFn, usePublicUrl bool, grpcDialOption grpc.DialOption, fileIds []string) ([]*volume_server_pb.DeleteResult, error) { lookupFunc := func(vids []string) (results map[string]LookupResult, err error) { - results, err = LookupVolumeIds(master, grpcDialOption, vids) + results, err = LookupVolumeIds(masterFn, grpcDialOption, vids) if err == nil && usePublicUrl { for _, result := range results { for _, loc := range result.Locations { |
