Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command =
- group:
- ns: 'pings'
- cond:
- 'ts': { $lt: new Date }
- 'ip': 'some IP'
- key: { ip: true }
- initial: { count: 0 }
- $reduce: (doc, out) ->
- out.count++
- # The executing part
- mongoose.connection.db.executeDbCommand command, (err, docs) ->
- console.log docs.documents[0].retval
Add Comment
Please, Sign In to add comment