-
Notifications
You must be signed in to change notification settings - Fork 198
Closed
Description
This is my code:
let p = new Parallel(businessChunks);
let result = yield p.map(businessIds => {
'use strict';
const Promise = require('bluebird');
const BusinessReport = require(process.cwd() + '/bin/dataExport/business');
return Promise.map(
businessIds,
businessId => {
let businessReport = new BusinessReport(businessId, {
qbConnectionString: 'address',
botId: 'id'
});
return businessReport.generate();
},
{
concurrency: process.env.TASK_CONCURRENCY
}
);
});
As you can see, within each worker I'm doing lots of asynchronous stuff using bluebird's promise library and I want the result if that to be returned. But the output gives me four promise objects. How do I get this to work?
Metadata
Metadata
Assignees
Labels
No labels