|
@ -95,9 +95,9 @@ func doUpload(uploadUrl string, filename string, cipher bool, reader io.Reader, |
|
|
|
|
|
|
|
|
func retriedUploadData(uploadUrl string, filename string, cipher bool, data []byte, isInputCompressed bool, mtype string, pairMap map[string]string, jwt security.EncodedJwt) (uploadResult *UploadResult, err error) { |
|
|
func retriedUploadData(uploadUrl string, filename string, cipher bool, data []byte, isInputCompressed bool, mtype string, pairMap map[string]string, jwt security.EncodedJwt) (uploadResult *UploadResult, err error) { |
|
|
for i := 0; i < 3; i++ { |
|
|
for i := 0; i < 3; i++ { |
|
|
uploadResult.RetryCount = i |
|
|
|
|
|
uploadResult, err = doUploadData(uploadUrl, filename, cipher, data, isInputCompressed, mtype, pairMap, jwt) |
|
|
uploadResult, err = doUploadData(uploadUrl, filename, cipher, data, isInputCompressed, mtype, pairMap, jwt) |
|
|
if err == nil { |
|
|
if err == nil { |
|
|
|
|
|
uploadResult.RetryCount = i |
|
|
return |
|
|
return |
|
|
} else { |
|
|
} else { |
|
|
glog.Warningf("uploading to %s: %v", uploadUrl, err) |
|
|
glog.Warningf("uploading to %s: %v", uploadUrl, err) |
|
|