gcs: use delete concurrency
This commit is contained in:
+12
-12
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user