{"action":"created","issue":{"url":"https://api.github.com/repos/Knowre-Dev/swint-fork/issues/7","repository_url":"https://api.github.com/repos/Knowre-Dev/swint-fork","labels_url":"https://api.github.com/repos/Knowre-Dev/swint-fork/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Knowre-Dev/swint-fork/issues/7/comments","events_url":"https://api.github.com/repos/Knowre-Dev/swint-fork/issues/7/events","html_url":"https://github.com/Knowre-Dev/swint-fork/issues/7","id":167508256,"number":7,"title":"blocking event when soft reset is fired","user":{"login":"plainOldCode","id":935485,"avatar_url":"https://avatars.githubusercontent.com/u/935485?v=3","gravatar_id":"","url":"https://api.github.com/users/plainOldCode","html_url":"https://github.com/plainOldCode","followers_url":"https://api.github.com/users/plainOldCode/followers","following_url":"https://api.github.com/users/plainOldCode/following{/other_user}","gists_url":"https://api.github.com/users/plainOldCode/gists{/gist_id}","starred_url":"https://api.github.com/users/plainOldCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plainOldCode/subscriptions","organizations_url":"https://api.github.com/users/plainOldCode/orgs","repos_url":"https://api.github.com/users/plainOldCode/repos","events_url":"https://api.github.com/users/plainOldCode/events{/privacy}","received_events_url":"https://api.github.com/users/plainOldCode/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-26T02:32:28Z","updated_at":"2016-08-02T01:39:47Z","closed_at":"2016-08-02T01:39:47Z","body":"```\r\ncase 'softReset':\r\n    if(!that.resetPostRun){\r\n        that.resetPost(function(err) {\r\n            if (err) {\r\n                print(4, err);\r\n                process.exit(-1);\r\n                return;\r\n            }\r\n            process.emit('controlEnd');\r\n        }); \r\n    }\r\n\r\n    break;\r\n```\r\n\r\n\r\n```\r\n_.resetPost = function(callback) {\r\n\tvar that = this,\r\n\t\tworkers = [];\r\n\r\n\tthis.resetPostRun = true;\r\n\r\n\tfor (var id in cluster.workers) {\r\n\t\tvar worker = cluster.workers[id];\r\n\r\n\t\tworkers.push(worker);\r\n\t}\r\n\r\n\tasync.series(\r\n\t\tworkers.map(function(v) {\r\n\t\t\treturn function(cb) {\r\n\t\t\t\tthat.evt.once('complete', function() {\r\n\t\t\t\t\tcb(null, true);\r\n\t\t\t\t});\r\n\t\t\t\tv.kill();\r\n\t\t\t};\r\n\t\t}),\r\n\t\tfunction(err) {\r\n\t\t\tcallback(err, true);\r\n\t\t\tthat.resetPostRun = false;\r\n\t\t}\r\n\t);\r\n};\r\n```"},"comment":{"url":"https://api.github.com/repos/Knowre-Dev/swint-fork/issues/comments/236767045","html_url":"https://github.com/Knowre-Dev/swint-fork/issues/7#issuecomment-236767045","issue_url":"https://api.github.com/repos/Knowre-Dev/swint-fork/issues/7","id":236767045,"user":{"login":"Kivol","id":2178507,"avatar_url":"https://avatars.githubusercontent.com/u/2178507?v=3","gravatar_id":"","url":"https://api.github.com/users/Kivol","html_url":"https://github.com/Kivol","followers_url":"https://api.github.com/users/Kivol/followers","following_url":"https://api.github.com/users/Kivol/following{/other_user}","gists_url":"https://api.github.com/users/Kivol/gists{/gist_id}","starred_url":"https://api.github.com/users/Kivol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kivol/subscriptions","organizations_url":"https://api.github.com/users/Kivol/orgs","repos_url":"https://api.github.com/users/Kivol/repos","events_url":"https://api.github.com/users/Kivol/events{/privacy}","received_events_url":"https://api.github.com/users/Kivol/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T01:39:47Z","updated_at":"2016-08-02T01:39:47Z","body":"Fixed in v1.2.1."}}
{"actor":{"display_login":"Kivol"}}