Last active
August 29, 2015 14:16
-
-
Save jrf0110/20d4474cee8fb098b78d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.user_invoices.findAysnc({ | |
status: 'pending' | |
, billing_period_begin: period.startDate | |
, billing_period_end: period.endDate | |
}) | |
.catch( function( error ){ throw error; }); | |
.map( function( invoice ){ | |
return invoices.create( invoice ) | |
.sendEmailAsync() | |
.error( function( error ){ | |
errors.push( error ); | |
}); | |
}, { concurrency: CONCURRENCY }) | |
.then( function(){ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment