Hey @Sander!
This thread convers something similar, I wonder if _.chunk and await might be useful for you as well ![]()
Could something like this work?
const batches = _.chunk(getean.data, batchSize);
const fullDataSet = [];
for(let eanValues of batches){
const promises = eanValues.map(/* trigger queries */);
const results = await Promise.all(promises);
fullDataSet.push(...results.flat());
}
return fullDataSet;
You might also explore using a loop block here!