Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async.waterfall([
- function(step) {
- console.log('ASSSSSSSSYNC in user here' + identifier);
- switch(identifier) {
- case 'user':
- //Models.CodeUsage.countByUser(identifier, step);
- step(null, 1);
- break;
- case 'cim':
- step(null, 0);
- break;
- }
- }
- ], function(err, identifier_uses) {
- if (err) { return callback(err); }
- if (identifier_uses >= max_identifier_uses) {
- console.log('- ' + identifier_uses + ' > ' + max_identifier_uses);
- return false;
- }
- console.log('- ' + identifier_uses + ' <= ' + max_identifier_uses);
- return true;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement