MCPcopy Index your code
hub / github.com/scality/cloudserver / gcpUploadWithRetry

Function gcpUploadWithRetry

tests/functional/raw-node/utils/gcpUtils.js:74–90  ·  view source on GitHub ↗
(gcpClient, params, retryOptions)

Source from the content-addressed store, hash-verified

72);
73
74async function gcpUploadWithRetry(gcpClient, params, retryOptions) {
75 const callFn = () => new Promise((resolve, reject) => {
76 gcpClient.upload(params, (err, data) => {
77 if (err) {
78 return reject(err);
79 }
80 return resolve(data);
81 });
82 });
83
84 return gcpRetryCall(callFn, {
85 maxAttempts: 6,
86 shouldRetry: defaultShouldRetryUpload,
87 getDelayMs: attempt => (attempt + 1) * 1000,
88 ...retryOptions,
89 });
90}
91
92async function gcpCreateMultipartUploadWithRetry(gcpClient, params, retryOptions) {
93 const callFn = () => new Promise((resolve, reject) => {

Callers 1

upload.jsFile · 0.85

Calls 1

gcpRetryCallFunction · 0.85

Tested by

no test coverage detected