gcs: use delete concurrency

This commit is contained in:
Girish Ramakrishnan
2021-02-01 14:23:15 -08:00
parent bcd04715c0
commit 282040ed1b
2 changed files with 23 additions and 23 deletions
+12 -12
View File
@@ -1,21 +1,21 @@
'use strict';
exports = module.exports = {
getBackupPath: getBackupPath,
checkPreconditions: checkPreconditions,
getBackupPath,
checkPreconditions,
upload: upload,
download: download,
copy: copy,
upload,
download,
copy,
listDir: listDir,
listDir,
remove: remove,
removeDir: removeDir,
remove,
removeDir,
testConfig: testConfig,
removePrivateFields: removePrivateFields,
injectPrivateFields: injectPrivateFields,
testConfig,
removePrivateFields,
injectPrivateFields,
// Used to mock GCS
_mockInject: mockInject,
@@ -212,7 +212,7 @@ function removeDir(apiConfig, pathPrefix) {
var events = new EventEmitter();
const batchSize = 1000, concurrency = 10; // https://googleapis.dev/nodejs/storage/latest/Bucket.html#deleteFiles
const batchSize = 1000, concurrency = apiConfig.deleteConcurrency || 10; // https://googleapis.dev/nodejs/storage/latest/Bucket.html#deleteFiles
var total = 0;
listDir(apiConfig, pathPrefix, batchSize, function (entries, done) {