Skip to content

Commit a5469c2

Browse files
committed
Add option for asyncLimit to set number of files processed at the same time
1 parent 3ff93c4 commit a5469c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/transfer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,9 @@ function _nonParseFileName(fileName) {
213213
* @return {Promise}
214214
*/
215215
function _processFiles(files, handler) {
216+
var asyncLimit = config.asyncLimit || 5;
216217
return new Promise(function(resolve, reject) {
217-
async.eachOfLimit(files, 5, function(file, index, callback) {
218+
async.eachOfLimit(files, asyncLimit, function(file, index, callback) {
218219
process.stdout.write('Processing '+(index+1)+'/'+files.length+'\r');
219220
file.newFileName = _nonParseFileName(file.fileName);
220221
if (_shouldTransferFile(file)) {

0 commit comments

Comments
 (0)