|
|
|
|
@ -136,17 +136,17 @@ function getBatches(array, keymapper, size = 50) {
|
|
|
|
|
return result;
|
|
|
|
|
}, {}),
|
|
|
|
|
batch = [],
|
|
|
|
|
batchs = [];
|
|
|
|
|
batches = [];
|
|
|
|
|
for (let items of Object.values(byKey)) {
|
|
|
|
|
batch = batch.concat(items);
|
|
|
|
|
if (batch.length < size) continue;
|
|
|
|
|
|
|
|
|
|
batchs.push([].concat(batch));
|
|
|
|
|
batches.push([].concat(batch));
|
|
|
|
|
batch.splice(0);
|
|
|
|
|
}
|
|
|
|
|
if (batch.length > 0)
|
|
|
|
|
batchs.push(batch);
|
|
|
|
|
return batchs;
|
|
|
|
|
batches.push(batch);
|
|
|
|
|
return batches;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function upload(options) {
|
|
|
|
|
|