{"action":"created","comment":{"url":"https://api.github.com/repos/tests-always-included/ddq/pulls/comments/92664448","pull_request_review_id":13184399,"id":92664448,"diff_hunk":"@@ -118,32 +138,72 @@ module.exports = (EventEmitter, timers) => {\n \n \n     /**\n-     * Class for DDQ.\n+     * Signals that a message is done being processed.\n+     *\n+     * When we were at our limit of simultaneous messages being processed,\n+     * this will start the backend up and let it poll again for more messages.\n+     *\n+     * @param {Ddq~DdqInstance} ddqInstance\n+     * @param {Function} [callback]\n+     */\n+    function messageCompleted(ddqInstance, callback) {\n+        if (ddqInstance.isPausedByLimits) {\n+            if (ddqInstance.messagesInTransit < ddqInstance.maxProcessingMessages) {\n+                ddqInstance.isPausedByLimits = false;\n+\n+                ddqInstance.listenStart(callback);\n+            }\n+        }\n+    }\n+\n+\n+    /**\n+     * Checks that a callback was passed as the first argument. If it\n+     * wasn't, it sets the first argument to a noop function.\n+     *\n+     * @return {Array} args\n+     */\n+    function validateArgs() {\n+        var args;\n+\n+        args = [].slice.call(arguments);\n+\n+        if (typeof args[0] !== \"function\") {\n+            args.unshift(noop);\n+        }\n+\n+        return args;\n+    }\n+\n+\n+    /**\n+     * DDQ class.","path":"lib/ddq.js","position":200,"original_position":200,"commit_id":"382ff132ef9d6ff5cb522c78c791af31fa3dea2d","original_commit_id":"382ff132ef9d6ff5cb522c78c791af31fa3dea2d","user":{"login":"lnagle93","id":13711016,"avatar_url":"https://avatars.githubusercontent.com/u/13711016?v=3","gravatar_id":"","url":"https://api.github.com/users/lnagle93","html_url":"https://github.com/lnagle93","followers_url":"https://api.github.com/users/lnagle93/followers","following_url":"https://api.github.com/users/lnagle93/following{/other_user}","gists_url":"https://api.github.com/users/lnagle93/gists{/gist_id}","starred_url":"https://api.github.com/users/lnagle93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lnagle93/subscriptions","organizations_url":"https://api.github.com/users/lnagle93/orgs","repos_url":"https://api.github.com/users/lnagle93/repos","events_url":"https://api.github.com/users/lnagle93/events{/privacy}","received_events_url":"https://api.github.com/users/lnagle93/received_events","type":"User","site_admin":false},"body":"Seems only beneficial if you're using a function as a class. The class declaration is two lines down. Leaving as is.","created_at":"2016-12-15T18:00:43Z","updated_at":"2016-12-15T18:00:43Z","html_url":"https://github.com/tests-always-included/ddq/pull/7#discussion_r92664448","pull_request_url":"https://api.github.com/repos/tests-always-included/ddq/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/tests-always-included/ddq/pulls/comments/92664448"},"html":{"href":"https://github.com/tests-always-included/ddq/pull/7#discussion_r92664448"},"pull_request":{"href":"https://api.github.com/repos/tests-always-included/ddq/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/tests-always-included/ddq/pulls/7","id":98181237,"html_url":"https://github.com/tests-always-included/ddq/pull/7","diff_url":"https://github.com/tests-always-included/ddq/pull/7.diff","patch_url":"https://github.com/tests-always-included/ddq/pull/7.patch","issue_url":"https://api.github.com/repos/tests-always-included/ddq/issues/7","number":7,"state":"open","locked":false,"title":"Release2.0","user":{"login":"lnagle93","id":13711016,"avatar_url":"https://avatars.githubusercontent.com/u/13711016?v=3","gravatar_id":"","url":"https://api.github.com/users/lnagle93","html_url":"https://github.com/lnagle93","followers_url":"https://api.github.com/users/lnagle93/followers","following_url":"https://api.github.com/users/lnagle93/following{/other_user}","gists_url":"https://api.github.com/users/lnagle93/gists{/gist_id}","starred_url":"https://api.github.com/users/lnagle93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lnagle93/subscriptions","organizations_url":"https://api.github.com/users/lnagle93/orgs","repos_url":"https://api.github.com/users/lnagle93/repos","events_url":"https://api.github.com/users/lnagle93/events{/privacy}","received_events_url":"https://api.github.com/users/lnagle93/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-15T16:15:36Z","updated_at":"2016-12-15T18:00:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bb07d91862a651a9634d47c449e7d499df07392","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tests-always-included/ddq/pulls/7/commits","review_comments_url":"https://api.github.com/repos/tests-always-included/ddq/pulls/7/comments","review_comment_url":"https://api.github.com/repos/tests-always-included/ddq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tests-always-included/ddq/issues/7/comments","statuses_url":"https://api.github.com/repos/tests-always-included/ddq/statuses/382ff132ef9d6ff5cb522c78c791af31fa3dea2d","head":{"label":"tests-always-included:release2.0","ref":"release2.0","sha":"382ff132ef9d6ff5cb522c78c791af31fa3dea2d","user":{"login":"tests-always-included","id":6856312,"avatar_url":"https://avatars.githubusercontent.com/u/6856312?v=3","gravatar_id":"","url":"https://api.github.com/users/tests-always-included","html_url":"https://github.com/tests-always-included","followers_url":"https://api.github.com/users/tests-always-included/followers","following_url":"https://api.github.com/users/tests-always-included/following{/other_user}","gists_url":"https://api.github.com/users/tests-always-included/gists{/gist_id}","starred_url":"https://api.github.com/users/tests-always-included/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tests-always-included/subscriptions","organizations_url":"https://api.github.com/users/tests-always-included/orgs","repos_url":"https://api.github.com/users/tests-always-included/repos","events_url":"https://api.github.com/users/tests-always-included/events{/privacy}","received_events_url":"https://api.github.com/users/tests-always-included/received_events","type":"Organization","site_admin":false},"repo":{"id":67234207,"name":"ddq","full_name":"tests-always-included/ddq","owner":{"login":"tests-always-included","id":6856312,"avatar_url":"https://avatars.githubusercontent.com/u/6856312?v=3","gravatar_id":"","url":"https://api.github.com/users/tests-always-included","html_url":"https://github.com/tests-always-included","followers_url":"https://api.github.com/users/tests-always-included/followers","following_url":"https://api.github.com/users/tests-always-included/following{/other_user}","gists_url":"https://api.github.com/users/tests-always-included/gists{/gist_id}","starred_url":"https://api.github.com/users/tests-always-included/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tests-always-included/subscriptions","organizations_url":"https://api.github.com/users/tests-always-included/orgs","repos_url":"https://api.github.com/users/tests-always-included/repos","events_url":"https://api.github.com/users/tests-always-included/events{/privacy}","received_events_url":"https://api.github.com/users/tests-always-included/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tests-always-included/ddq","description":"DeDuplicated Queue","fork":false,"url":"https://api.github.com/repos/tests-always-included/ddq","forks_url":"https://api.github.com/repos/tests-always-included/ddq/forks","keys_url":"https://api.github.com/repos/tests-always-included/ddq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tests-always-included/ddq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tests-always-included/ddq/teams","hooks_url":"https://api.github.com/repos/tests-always-included/ddq/hooks","issue_events_url":"https://api.github.com/repos/tests-always-included/ddq/issues/events{/number}","events_url":"https://api.github.com/repos/tests-always-included/ddq/events","assignees_url":"https://api.github.com/repos/tests-always-included/ddq/assignees{/user}","branches_url":"https://api.github.com/repos/tests-always-included/ddq/branches{/branch}","tags_url":"https://api.github.com/repos/tests-always-included/ddq/tags","blobs_url":"https://api.github.com/repos/tests-always-included/ddq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tests-always-included/ddq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tests-always-included/ddq/git/refs{/sha}","trees_url":"https://api.github.com/repos/tests-always-included/ddq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tests-always-included/ddq/statuses/{sha}","languages_url":"https://api.github.com/repos/tests-always-included/ddq/languages","stargazers_url":"https://api.github.com/repos/tests-always-included/ddq/stargazers","contributors_url":"https://api.github.com/repos/tests-always-included/ddq/contributors","subscribers_url":"https://api.github.com/repos/tests-always-included/ddq/subscribers","subscription_url":"https://api.github.com/repos/tests-always-included/ddq/subscription","commits_url":"https://api.github.com/repos/tests-always-included/ddq/commits{/sha}","git_commits_url":"https://api.github.com/repos/tests-always-included/ddq/git/commits{/sha}","comments_url":"https://api.github.com/repos/tests-always-included/ddq/comments{/number}","issue_comment_url":"https://api.github.com/repos/tests-always-included/ddq/issues/comments{/number}","contents_url":"https://api.github.com/repos/tests-always-included/ddq/contents/{+path}","compare_url":"https://api.github.com/repos/tests-always-included/ddq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tests-always-included/ddq/merges","archive_url":"https://api.github.com/repos/tests-always-included/ddq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tests-always-included/ddq/downloads","issues_url":"https://api.github.com/repos/tests-always-included/ddq/issues{/number}","pulls_url":"https://api.github.com/repos/tests-always-included/ddq/pulls{/number}","milestones_url":"https://api.github.com/repos/tests-always-included/ddq/milestones{/number}","notifications_url":"https://api.github.com/repos/tests-always-included/ddq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tests-always-included/ddq/labels{/name}","releases_url":"https://api.github.com/repos/tests-always-included/ddq/releases{/id}","deployments_url":"https://api.github.com/repos/tests-always-included/ddq/deployments","created_at":"2016-09-02T15:30:44Z","updated_at":"2016-11-03T12:48:14Z","pushed_at":"2016-12-15T16:15:37Z","git_url":"git://github.com/tests-always-included/ddq.git","ssh_url":"git@github.com:tests-always-included/ddq.git","clone_url":"https://github.com/tests-always-included/ddq.git","svn_url":"https://github.com/tests-always-included/ddq","homepage":null,"size":64,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"tests-always-included:master","ref":"master","sha":"9ec040d378356b01af7af5d02f28b004e3662b6b","user":{"login":"tests-always-included","id":6856312,"avatar_url":"https://avatars.githubusercontent.com/u/6856312?v=3","gravatar_id":"","url":"https://api.github.com/users/tests-always-included","html_url":"https://github.com/tests-always-included","followers_url":"https://api.github.com/users/tests-always-included/followers","following_url":"https://api.github.com/users/tests-always-included/following{/other_user}","gists_url":"https://api.github.com/users/tests-always-included/gists{/gist_id}","starred_url":"https://api.github.com/users/tests-always-included/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tests-always-included/subscriptions","organizations_url":"https://api.github.com/users/tests-always-included/orgs","repos_url":"https://api.github.com/users/tests-always-included/repos","events_url":"https://api.github.com/users/tests-always-included/events{/privacy}","received_events_url":"https://api.github.com/users/tests-always-included/received_events","type":"Organization","site_admin":false},"repo":{"id":67234207,"name":"ddq","full_name":"tests-always-included/ddq","owner":{"login":"tests-always-included","id":6856312,"avatar_url":"https://avatars.githubusercontent.com/u/6856312?v=3","gravatar_id":"","url":"https://api.github.com/users/tests-always-included","html_url":"https://github.com/tests-always-included","followers_url":"https://api.github.com/users/tests-always-included/followers","following_url":"https://api.github.com/users/tests-always-included/following{/other_user}","gists_url":"https://api.github.com/users/tests-always-included/gists{/gist_id}","starred_url":"https://api.github.com/users/tests-always-included/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tests-always-included/subscriptions","organizations_url":"https://api.github.com/users/tests-always-included/orgs","repos_url":"https://api.github.com/users/tests-always-included/repos","events_url":"https://api.github.com/users/tests-always-included/events{/privacy}","received_events_url":"https://api.github.com/users/tests-always-included/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tests-always-included/ddq","description":"DeDuplicated Queue","fork":false,"url":"https://api.github.com/repos/tests-always-included/ddq","forks_url":"https://api.github.com/repos/tests-always-included/ddq/forks","keys_url":"https://api.github.com/repos/tests-always-included/ddq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tests-always-included/ddq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tests-always-included/ddq/teams","hooks_url":"https://api.github.com/repos/tests-always-included/ddq/hooks","issue_events_url":"https://api.github.com/repos/tests-always-included/ddq/issues/events{/number}","events_url":"https://api.github.com/repos/tests-always-included/ddq/events","assignees_url":"https://api.github.com/repos/tests-always-included/ddq/assignees{/user}","branches_url":"https://api.github.com/repos/tests-always-included/ddq/branches{/branch}","tags_url":"https://api.github.com/repos/tests-always-included/ddq/tags","blobs_url":"https://api.github.com/repos/tests-always-included/ddq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tests-always-included/ddq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tests-always-included/ddq/git/refs{/sha}","trees_url":"https://api.github.com/repos/tests-always-included/ddq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tests-always-included/ddq/statuses/{sha}","languages_url":"https://api.github.com/repos/tests-always-included/ddq/languages","stargazers_url":"https://api.github.com/repos/tests-always-included/ddq/stargazers","contributors_url":"https://api.github.com/repos/tests-always-included/ddq/contributors","subscribers_url":"https://api.github.com/repos/tests-always-included/ddq/subscribers","subscription_url":"https://api.github.com/repos/tests-always-included/ddq/subscription","commits_url":"https://api.github.com/repos/tests-always-included/ddq/commits{/sha}","git_commits_url":"https://api.github.com/repos/tests-always-included/ddq/git/commits{/sha}","comments_url":"https://api.github.com/repos/tests-always-included/ddq/comments{/number}","issue_comment_url":"https://api.github.com/repos/tests-always-included/ddq/issues/comments{/number}","contents_url":"https://api.github.com/repos/tests-always-included/ddq/contents/{+path}","compare_url":"https://api.github.com/repos/tests-always-included/ddq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tests-always-included/ddq/merges","archive_url":"https://api.github.com/repos/tests-always-included/ddq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tests-always-included/ddq/downloads","issues_url":"https://api.github.com/repos/tests-always-included/ddq/issues{/number}","pulls_url":"https://api.github.com/repos/tests-always-included/ddq/pulls{/number}","milestones_url":"https://api.github.com/repos/tests-always-included/ddq/milestones{/number}","notifications_url":"https://api.github.com/repos/tests-always-included/ddq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tests-always-included/ddq/labels{/name}","releases_url":"https://api.github.com/repos/tests-always-included/ddq/releases{/id}","deployments_url":"https://api.github.com/repos/tests-always-included/ddq/deployments","created_at":"2016-09-02T15:30:44Z","updated_at":"2016-11-03T12:48:14Z","pushed_at":"2016-12-15T16:15:37Z","git_url":"git://github.com/tests-always-included/ddq.git","ssh_url":"git@github.com:tests-always-included/ddq.git","clone_url":"https://github.com/tests-always-included/ddq.git","svn_url":"https://github.com/tests-always-included/ddq","homepage":null,"size":64,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tests-always-included/ddq/pulls/7"},"html":{"href":"https://github.com/tests-always-included/ddq/pull/7"},"issue":{"href":"https://api.github.com/repos/tests-always-included/ddq/issues/7"},"comments":{"href":"https://api.github.com/repos/tests-always-included/ddq/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/tests-always-included/ddq/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/tests-always-included/ddq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tests-always-included/ddq/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/tests-always-included/ddq/statuses/382ff132ef9d6ff5cb522c78c791af31fa3dea2d"}}}}
{"actor":{"display_login":"lnagle93"}}