{"action":"created","comment":{"url":"https://api.github.com/repos/enb-make/enb/pulls/comments/34026394","id":34026394,"diff_hunk":"@@ -0,0 +1,50 @@\n+/**\n+ * JobQueue\n+ *\n+ * Очередь для выполнения тасок в параллельных подпроцессах\n+ */\n+\n+var inherit = require('inherit');\n+var workerFarm = require('worker-farm');\n+var vow = require('vow');\n+\n+module.exports = inherit({\n+    ///\n+    __constructor: function () {\n+        this._workers = null;\n+    },\n+\n+    ///\n+    destruct: function () {\n+        if (this._workers) {\n+            workerFarm.end(this._workers);\n+            this._workers = null;\n+        }\n+    },\n+\n+    /**\n+     * Добавить задачу в очередь исполнения\n+     * @param {String} path путь к модулю-обработчику\n+     * @param {...} args аргументы, передаваемые в обработчик\n+     * @return {Promise} промис с результатом выполнения задачи\n+     */\n+    push: function () {\n+        if (!this._workers) {\n+            this._workers = workerFarm(require.resolve('./processor'));","path":"lib/shared-resources/job-queue/index.js","position":33,"original_position":33,"commit_id":"633c52bc22931a8142e2415c4653c8b9aca99e7d","original_commit_id":"633c52bc22931a8142e2415c4653c8b9aca99e7d","user":{"login":"j0tunn","id":7701229,"avatar_url":"https://avatars.githubusercontent.com/u/7701229?v=3","gravatar_id":"","url":"https://api.github.com/users/j0tunn","html_url":"https://github.com/j0tunn","followers_url":"https://api.github.com/users/j0tunn/followers","following_url":"https://api.github.com/users/j0tunn/following{/other_user}","gists_url":"https://api.github.com/users/j0tunn/gists{/gist_id}","starred_url":"https://api.github.com/users/j0tunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j0tunn/subscriptions","organizations_url":"https://api.github.com/users/j0tunn/orgs","repos_url":"https://api.github.com/users/j0tunn/repos","events_url":"https://api.github.com/users/j0tunn/events{/privacy}","received_events_url":"https://api.github.com/users/j0tunn/received_events","type":"User","site_admin":false},"body":"Я настаиваю на том, чтобы не делать это конфигурябельным. \r\nДля людей, не разбирающихся зачем и как это работает, они будут бесполезными + это лишняя возможность выстрелить себе в ногу.\r\nТот, кому это понадобится, при необходимости сделает PR. И вот он уже гарантировано разберется что это и зачем","created_at":"2015-07-07T10:24:51Z","updated_at":"2015-07-07T10:24:51Z","html_url":"https://github.com/enb-make/enb/pull/257#discussion_r34026394","pull_request_url":"https://api.github.com/repos/enb-make/enb/pulls/257","_links":{"self":{"href":"https://api.github.com/repos/enb-make/enb/pulls/comments/34026394"},"html":{"href":"https://github.com/enb-make/enb/pull/257#discussion_r34026394"},"pull_request":{"href":"https://api.github.com/repos/enb-make/enb/pulls/257"}}},"pull_request":{"url":"https://api.github.com/repos/enb-make/enb/pulls/257","id":39207717,"html_url":"https://github.com/enb-make/enb/pull/257","diff_url":"https://github.com/enb-make/enb/pull/257.diff","patch_url":"https://github.com/enb-make/enb/pull/257.patch","issue_url":"https://api.github.com/repos/enb-make/enb/issues/257","number":257,"state":"open","locked":false,"title":"Job queue","user":{"login":"j0tunn","id":7701229,"avatar_url":"https://avatars.githubusercontent.com/u/7701229?v=3","gravatar_id":"","url":"https://api.github.com/users/j0tunn","html_url":"https://github.com/j0tunn","followers_url":"https://api.github.com/users/j0tunn/followers","following_url":"https://api.github.com/users/j0tunn/following{/other_user}","gists_url":"https://api.github.com/users/j0tunn/gists{/gist_id}","starred_url":"https://api.github.com/users/j0tunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j0tunn/subscriptions","organizations_url":"https://api.github.com/users/j0tunn/orgs","repos_url":"https://api.github.com/users/j0tunn/repos","events_url":"https://api.github.com/users/j0tunn/events{/privacy}","received_events_url":"https://api.github.com/users/j0tunn/received_events","type":"User","site_admin":false},"body":"Shared Job Queue, which can be used in technologies.","created_at":"2015-07-04T13:25:49Z","updated_at":"2015-07-07T10:24:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e067eedf5a478dc75d5abffd943ccaeed032586f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/enb-make/enb/pulls/257/commits","review_comments_url":"https://api.github.com/repos/enb-make/enb/pulls/257/comments","review_comment_url":"https://api.github.com/repos/enb-make/enb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/enb-make/enb/issues/257/comments","statuses_url":"https://api.github.com/repos/enb-make/enb/statuses/633c52bc22931a8142e2415c4653c8b9aca99e7d","head":{"label":"j0tunn:feature/job.queue","ref":"feature/job.queue","sha":"633c52bc22931a8142e2415c4653c8b9aca99e7d","user":{"login":"j0tunn","id":7701229,"avatar_url":"https://avatars.githubusercontent.com/u/7701229?v=3","gravatar_id":"","url":"https://api.github.com/users/j0tunn","html_url":"https://github.com/j0tunn","followers_url":"https://api.github.com/users/j0tunn/followers","following_url":"https://api.github.com/users/j0tunn/following{/other_user}","gists_url":"https://api.github.com/users/j0tunn/gists{/gist_id}","starred_url":"https://api.github.com/users/j0tunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j0tunn/subscriptions","organizations_url":"https://api.github.com/users/j0tunn/orgs","repos_url":"https://api.github.com/users/j0tunn/repos","events_url":"https://api.github.com/users/j0tunn/events{/privacy}","received_events_url":"https://api.github.com/users/j0tunn/received_events","type":"User","site_admin":false},"repo":{"id":38531081,"name":"enb","full_name":"j0tunn/enb","owner":{"login":"j0tunn","id":7701229,"avatar_url":"https://avatars.githubusercontent.com/u/7701229?v=3","gravatar_id":"","url":"https://api.github.com/users/j0tunn","html_url":"https://github.com/j0tunn","followers_url":"https://api.github.com/users/j0tunn/followers","following_url":"https://api.github.com/users/j0tunn/following{/other_user}","gists_url":"https://api.github.com/users/j0tunn/gists{/gist_id}","starred_url":"https://api.github.com/users/j0tunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j0tunn/subscriptions","organizations_url":"https://api.github.com/users/j0tunn/orgs","repos_url":"https://api.github.com/users/j0tunn/repos","events_url":"https://api.github.com/users/j0tunn/events{/privacy}","received_events_url":"https://api.github.com/users/j0tunn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/j0tunn/enb","description":"Faster BEM/BEViS assembler","fork":true,"url":"https://api.github.com/repos/j0tunn/enb","forks_url":"https://api.github.com/repos/j0tunn/enb/forks","keys_url":"https://api.github.com/repos/j0tunn/enb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/j0tunn/enb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/j0tunn/enb/teams","hooks_url":"https://api.github.com/repos/j0tunn/enb/hooks","issue_events_url":"https://api.github.com/repos/j0tunn/enb/issues/events{/number}","events_url":"https://api.github.com/repos/j0tunn/enb/events","assignees_url":"https://api.github.com/repos/j0tunn/enb/assignees{/user}","branches_url":"https://api.github.com/repos/j0tunn/enb/branches{/branch}","tags_url":"https://api.github.com/repos/j0tunn/enb/tags","blobs_url":"https://api.github.com/repos/j0tunn/enb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/j0tunn/enb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/j0tunn/enb/git/refs{/sha}","trees_url":"https://api.github.com/repos/j0tunn/enb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/j0tunn/enb/statuses/{sha}","languages_url":"https://api.github.com/repos/j0tunn/enb/languages","stargazers_url":"https://api.github.com/repos/j0tunn/enb/stargazers","contributors_url":"https://api.github.com/repos/j0tunn/enb/contributors","subscribers_url":"https://api.github.com/repos/j0tunn/enb/subscribers","subscription_url":"https://api.github.com/repos/j0tunn/enb/subscription","commits_url":"https://api.github.com/repos/j0tunn/enb/commits{/sha}","git_commits_url":"https://api.github.com/repos/j0tunn/enb/git/commits{/sha}","comments_url":"https://api.github.com/repos/j0tunn/enb/comments{/number}","issue_comment_url":"https://api.github.com/repos/j0tunn/enb/issues/comments{/number}","contents_url":"https://api.github.com/repos/j0tunn/enb/contents/{+path}","compare_url":"https://api.github.com/repos/j0tunn/enb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/j0tunn/enb/merges","archive_url":"https://api.github.com/repos/j0tunn/enb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/j0tunn/enb/downloads","issues_url":"https://api.github.com/repos/j0tunn/enb/issues{/number}","pulls_url":"https://api.github.com/repos/j0tunn/enb/pulls{/number}","milestones_url":"https://api.github.com/repos/j0tunn/enb/milestones{/number}","notifications_url":"https://api.github.com/repos/j0tunn/enb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/j0tunn/enb/labels{/name}","releases_url":"https://api.github.com/repos/j0tunn/enb/releases{/id}","created_at":"2015-07-04T10:59:43Z","updated_at":"2015-07-04T10:59:43Z","pushed_at":"2015-07-06T13:38:42Z","git_url":"git://github.com/j0tunn/enb.git","ssh_url":"git@github.com:j0tunn/enb.git","clone_url":"https://github.com/j0tunn/enb.git","svn_url":"https://github.com/j0tunn/enb","homepage":"http://enb-make.info","size":3395,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"enb-make:master","ref":"master","sha":"e784ce274e38a1c90ed9a09cc6d7a1428c7fa701","user":{"login":"enb-make","id":4427117,"avatar_url":"https://avatars.githubusercontent.com/u/4427117?v=3","gravatar_id":"","url":"https://api.github.com/users/enb-make","html_url":"https://github.com/enb-make","followers_url":"https://api.github.com/users/enb-make/followers","following_url":"https://api.github.com/users/enb-make/following{/other_user}","gists_url":"https://api.github.com/users/enb-make/gists{/gist_id}","starred_url":"https://api.github.com/users/enb-make/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enb-make/subscriptions","organizations_url":"https://api.github.com/users/enb-make/orgs","repos_url":"https://api.github.com/users/enb-make/repos","events_url":"https://api.github.com/users/enb-make/events{/privacy}","received_events_url":"https://api.github.com/users/enb-make/received_events","type":"Organization","site_admin":false},"repo":{"id":10054361,"name":"enb","full_name":"enb-make/enb","owner":{"login":"enb-make","id":4427117,"avatar_url":"https://avatars.githubusercontent.com/u/4427117?v=3","gravatar_id":"","url":"https://api.github.com/users/enb-make","html_url":"https://github.com/enb-make","followers_url":"https://api.github.com/users/enb-make/followers","following_url":"https://api.github.com/users/enb-make/following{/other_user}","gists_url":"https://api.github.com/users/enb-make/gists{/gist_id}","starred_url":"https://api.github.com/users/enb-make/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enb-make/subscriptions","organizations_url":"https://api.github.com/users/enb-make/orgs","repos_url":"https://api.github.com/users/enb-make/repos","events_url":"https://api.github.com/users/enb-make/events{/privacy}","received_events_url":"https://api.github.com/users/enb-make/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enb-make/enb","description":"Faster BEM/BEViS assembler","fork":false,"url":"https://api.github.com/repos/enb-make/enb","forks_url":"https://api.github.com/repos/enb-make/enb/forks","keys_url":"https://api.github.com/repos/enb-make/enb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enb-make/enb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enb-make/enb/teams","hooks_url":"https://api.github.com/repos/enb-make/enb/hooks","issue_events_url":"https://api.github.com/repos/enb-make/enb/issues/events{/number}","events_url":"https://api.github.com/repos/enb-make/enb/events","assignees_url":"https://api.github.com/repos/enb-make/enb/assignees{/user}","branches_url":"https://api.github.com/repos/enb-make/enb/branches{/branch}","tags_url":"https://api.github.com/repos/enb-make/enb/tags","blobs_url":"https://api.github.com/repos/enb-make/enb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enb-make/enb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enb-make/enb/git/refs{/sha}","trees_url":"https://api.github.com/repos/enb-make/enb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enb-make/enb/statuses/{sha}","languages_url":"https://api.github.com/repos/enb-make/enb/languages","stargazers_url":"https://api.github.com/repos/enb-make/enb/stargazers","contributors_url":"https://api.github.com/repos/enb-make/enb/contributors","subscribers_url":"https://api.github.com/repos/enb-make/enb/subscribers","subscription_url":"https://api.github.com/repos/enb-make/enb/subscription","commits_url":"https://api.github.com/repos/enb-make/enb/commits{/sha}","git_commits_url":"https://api.github.com/repos/enb-make/enb/git/commits{/sha}","comments_url":"https://api.github.com/repos/enb-make/enb/comments{/number}","issue_comment_url":"https://api.github.com/repos/enb-make/enb/issues/comments{/number}","contents_url":"https://api.github.com/repos/enb-make/enb/contents/{+path}","compare_url":"https://api.github.com/repos/enb-make/enb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enb-make/enb/merges","archive_url":"https://api.github.com/repos/enb-make/enb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enb-make/enb/downloads","issues_url":"https://api.github.com/repos/enb-make/enb/issues{/number}","pulls_url":"https://api.github.com/repos/enb-make/enb/pulls{/number}","milestones_url":"https://api.github.com/repos/enb-make/enb/milestones{/number}","notifications_url":"https://api.github.com/repos/enb-make/enb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enb-make/enb/labels{/name}","releases_url":"https://api.github.com/repos/enb-make/enb/releases{/id}","created_at":"2013-05-14T12:15:32Z","updated_at":"2015-06-21T21:56:52Z","pushed_at":"2015-07-06T13:38:43Z","git_url":"git://github.com/enb-make/enb.git","ssh_url":"git@github.com:enb-make/enb.git","clone_url":"https://github.com/enb-make/enb.git","svn_url":"https://github.com/enb-make/enb","homepage":"http://enb-make.info","size":3395,"stargazers_count":85,"watchers_count":85,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":43,"forks":48,"open_issues":43,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/enb-make/enb/pulls/257"},"html":{"href":"https://github.com/enb-make/enb/pull/257"},"issue":{"href":"https://api.github.com/repos/enb-make/enb/issues/257"},"comments":{"href":"https://api.github.com/repos/enb-make/enb/issues/257/comments"},"review_comments":{"href":"https://api.github.com/repos/enb-make/enb/pulls/257/comments"},"review_comment":{"href":"https://api.github.com/repos/enb-make/enb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/enb-make/enb/pulls/257/commits"},"statuses":{"href":"https://api.github.com/repos/enb-make/enb/statuses/633c52bc22931a8142e2415c4653c8b9aca99e7d"}}}}