{"action":"created","issue":{"url":"https://api.github.com/repos/gordonmleigh/promised-mongo/issues/14","labels_url":"https://api.github.com/repos/gordonmleigh/promised-mongo/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/gordonmleigh/promised-mongo/issues/14/comments","events_url":"https://api.github.com/repos/gordonmleigh/promised-mongo/issues/14/events","html_url":"https://github.com/gordonmleigh/promised-mongo/issues/14","id":56582845,"number":14,"title":"Tailable Cursor documentation doesn't work","user":{"login":"Earl-Brown","id":1141594,"avatar_url":"https://avatars.githubusercontent.com/u/1141594?v=3","gravatar_id":"","url":"https://api.github.com/users/Earl-Brown","html_url":"https://github.com/Earl-Brown","followers_url":"https://api.github.com/users/Earl-Brown/followers","following_url":"https://api.github.com/users/Earl-Brown/following{/other_user}","gists_url":"https://api.github.com/users/Earl-Brown/gists{/gist_id}","starred_url":"https://api.github.com/users/Earl-Brown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Earl-Brown/subscriptions","organizations_url":"https://api.github.com/users/Earl-Brown/orgs","repos_url":"https://api.github.com/users/Earl-Brown/repos","events_url":"https://api.github.com/users/Earl-Brown/events{/privacy}","received_events_url":"https://api.github.com/users/Earl-Brown/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-04T20:29:36Z","updated_at":"2015-02-04T20:38:57Z","closed_at":null,"body":"When I try to register \"cursor.on\" I get an \"undefined is not a function\" error.\r\n\r\nI can set a breakpoint and inspect \"cursor\" - and there is no \"on\"; and I can't see how I should receive items.\r\n\r\nSince this is promised-mongo, I'm guessing there's a promise callback?\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/gordonmleigh/promised-mongo/issues/comments/72934165","html_url":"https://github.com/gordonmleigh/promised-mongo/issues/14#issuecomment-72934165","issue_url":"https://api.github.com/repos/gordonmleigh/promised-mongo/issues/14","id":72934165,"user":{"login":"Earl-Brown","id":1141594,"avatar_url":"https://avatars.githubusercontent.com/u/1141594?v=3","gravatar_id":"","url":"https://api.github.com/users/Earl-Brown","html_url":"https://github.com/Earl-Brown","followers_url":"https://api.github.com/users/Earl-Brown/followers","following_url":"https://api.github.com/users/Earl-Brown/following{/other_user}","gists_url":"https://api.github.com/users/Earl-Brown/gists{/gist_id}","starred_url":"https://api.github.com/users/Earl-Brown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Earl-Brown/subscriptions","organizations_url":"https://api.github.com/users/Earl-Brown/orgs","repos_url":"https://api.github.com/users/Earl-Brown/repos","events_url":"https://api.github.com/users/Earl-Brown/events{/privacy}","received_events_url":"https://api.github.com/users/Earl-Brown/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T20:38:57Z","updated_at":"2015-02-04T20:38:57Z","body":"Here's a code snippet to get a feel for what I'm doing:\r\n```javascript\r\nfunction setupAlerts(queue) {\r\n\r\n  debugger;\r\n  var cursor = queue.find(\r\n    {   // query\r\n\r\n    }, \r\n    {},     // projection\r\n    {tailable: true, timeout: false}\r\n  );\r\n  //cursor.on(\"data\", function(data) {\r\n  //  // send message \r\n  //  debugger;\r\n  //});\r\n\r\n}\r\n\r\ndb.dropCollection(\"alertsQueue\").then(function() {\r\n  db.createCollection(\r\n    \"alertsQueue\", \r\n    {\r\n      capped: true, \r\n      size: 4096 * 2, \r\n      max: 256, \r\n//      awaitdata: true, \r\n      timeout: false\r\n    }\r\n  )\r\n  .then(setupAlerts)\r\n  .catch(function(err) {\r\n    console.error(\"Something happened with the alerts queue.  \" + err);\r\n    process.exit(1);\r\n  });\r\n});\r\n```"}}