{"action":"created","issue":{"url":"https://api.github.com/repos/caolan/async/issues/986","labels_url":"https://api.github.com/repos/caolan/async/issues/986/labels{/name}","comments_url":"https://api.github.com/repos/caolan/async/issues/986/comments","events_url":"https://api.github.com/repos/caolan/async/issues/986/events","html_url":"https://github.com/caolan/async/issues/986","id":123555424,"number":986,"title":"queue drain","user":{"login":"KevinBurton","id":2643566,"avatar_url":"https://avatars.githubusercontent.com/u/2643566?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinBurton","html_url":"https://github.com/KevinBurton","followers_url":"https://api.github.com/users/KevinBurton/followers","following_url":"https://api.github.com/users/KevinBurton/following{/other_user}","gists_url":"https://api.github.com/users/KevinBurton/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinBurton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinBurton/subscriptions","organizations_url":"https://api.github.com/users/KevinBurton/orgs","repos_url":"https://api.github.com/users/KevinBurton/repos","events_url":"https://api.github.com/users/KevinBurton/events{/privacy}","received_events_url":"https://api.github.com/users/KevinBurton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T21:01:50Z","updated_at":"2015-12-22T22:00:03Z","closed_at":null,"body":"I am pushing items onto a queue like:\r\n\r\n    self.q.push(tables, function(err) {\r\n\r\nand then defining \r\n\r\n    self.q.drain = function(err) {\r\n        callback(err);\r\n    };\r\n\r\nBut it seems that drain is never called. What do you think I am doing wrong? Under what conditions will drain get called?\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/caolan/async/issues/comments/166741775","html_url":"https://github.com/caolan/async/issues/986#issuecomment-166741775","issue_url":"https://api.github.com/repos/caolan/async/issues/986","id":166741775,"user":{"login":"KevinBurton","id":2643566,"avatar_url":"https://avatars.githubusercontent.com/u/2643566?v=3","gravatar_id":"","url":"https://api.github.com/users/KevinBurton","html_url":"https://github.com/KevinBurton","followers_url":"https://api.github.com/users/KevinBurton/followers","following_url":"https://api.github.com/users/KevinBurton/following{/other_user}","gists_url":"https://api.github.com/users/KevinBurton/gists{/gist_id}","starred_url":"https://api.github.com/users/KevinBurton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KevinBurton/subscriptions","organizations_url":"https://api.github.com/users/KevinBurton/orgs","repos_url":"https://api.github.com/users/KevinBurton/repos","events_url":"https://api.github.com/users/KevinBurton/events{/privacy}","received_events_url":"https://api.github.com/users/KevinBurton/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T22:00:02Z","updated_at":"2015-12-22T22:00:02Z","body":"One more piece of information. I am using Node.js fs to write to a file. I am using asychronous methods in the 'worker'. Is that not allowed? Could this be contributing to my problem?\r\n\r\nThanks again."}}