Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var thisQuery = tableModel.find();
- thisQuery.select('name');
- thisQuery.sort('name');
- thisQuery.where('status', 'Active');
- thisQuery.exec(function(err, items) {
- if (err){
- console.log('######## '+new Date()+', SOCKET iWantListName RUN : ' + err);
- }else{
- async.each(items,function(eachItem,callbackEach) {
- tableModel.update({
- '_id' : eachItem._id
- },{
- $set: {
- 'quota_trip' : [1,2,3,4]
- }
- },function(error,result) {
- callbackEach();
- });
- }
- },function(errEach) {
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment