{"action":"opened","number":8,"pull_request":{"url":"https://api.github.com/repos/gskerry/func.io/pulls/8","id":38743246,"html_url":"https://github.com/gskerry/func.io/pull/8","diff_url":"https://github.com/gskerry/func.io/pull/8.diff","patch_url":"https://github.com/gskerry/func.io/pull/8.patch","issue_url":"https://api.github.com/repos/gskerry/func.io/issues/8","number":8,"state":"open","locked":false,"title":"Fix async issues","user":{"login":"alexyuningliu","id":2261842,"avatar_url":"https://avatars.githubusercontent.com/u/2261842?v=3","gravatar_id":"","url":"https://api.github.com/users/alexyuningliu","html_url":"https://github.com/alexyuningliu","followers_url":"https://api.github.com/users/alexyuningliu/followers","following_url":"https://api.github.com/users/alexyuningliu/following{/other_user}","gists_url":"https://api.github.com/users/alexyuningliu/gists{/gist_id}","starred_url":"https://api.github.com/users/alexyuningliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexyuningliu/subscriptions","organizations_url":"https://api.github.com/users/alexyuningliu/orgs","repos_url":"https://api.github.com/users/alexyuningliu/repos","events_url":"https://api.github.com/users/alexyuningliu/events{/privacy}","received_events_url":"https://api.github.com/users/alexyuningliu/received_events","type":"User","site_admin":false},"body":"@gskerry, please `npm install` again after this PR is merged, as I'm using *async* and *chokidar* libraries for async handling and file watching, respectively.\r\n\r\nThis PR was necessary because the process of `docker` executing the script and creating the `outfile` was inherently asynchronous. It was difficult to figure out how to get `docker` to communicate with the host machine when it is done executing the file, but the approach I took is that:\r\n1. Docker would write a special file in a the folder `6-docker-done/' called 'done.json' once it was finished writing the outfile.\r\n2. We already have a directory-watcher set up via `chokidar` that is watching for changes in the `6-docker-done` directory, which will execute the `async` callback `callback(null, 'three');` once the `done.json` file is written, telling the server that it can now...\r\n3. Move on to the next step of sending the contents of `outfile.json` back to the client for the next step.\r\n\r\nA bit involved, but it does solve our async problems. Try it out and let me know your thoughts!","created_at":"2015-06-29T05:48:51Z","updated_at":"2015-06-29T05:48:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gskerry/func.io/pulls/8/commits","review_comments_url":"https://api.github.com/repos/gskerry/func.io/pulls/8/comments","review_comment_url":"https://api.github.com/repos/gskerry/func.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gskerry/func.io/issues/8/comments","statuses_url":"https://api.github.com/repos/gskerry/func.io/statuses/fecd824dd54ddd4fd9384c8c953b6e28cbe116e2","head":{"label":"gskerry:fix-async-issues","ref":"fix-async-issues","sha":"fecd824dd54ddd4fd9384c8c953b6e28cbe116e2","user":{"login":"gskerry","id":8867156,"avatar_url":"https://avatars.githubusercontent.com/u/8867156?v=3","gravatar_id":"","url":"https://api.github.com/users/gskerry","html_url":"https://github.com/gskerry","followers_url":"https://api.github.com/users/gskerry/followers","following_url":"https://api.github.com/users/gskerry/following{/other_user}","gists_url":"https://api.github.com/users/gskerry/gists{/gist_id}","starred_url":"https://api.github.com/users/gskerry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gskerry/subscriptions","organizations_url":"https://api.github.com/users/gskerry/orgs","repos_url":"https://api.github.com/users/gskerry/repos","events_url":"https://api.github.com/users/gskerry/events{/privacy}","received_events_url":"https://api.github.com/users/gskerry/received_events","type":"User","site_admin":false},"repo":{"id":38175318,"name":"func.io","full_name":"gskerry/func.io","owner":{"login":"gskerry","id":8867156,"avatar_url":"https://avatars.githubusercontent.com/u/8867156?v=3","gravatar_id":"","url":"https://api.github.com/users/gskerry","html_url":"https://github.com/gskerry","followers_url":"https://api.github.com/users/gskerry/followers","following_url":"https://api.github.com/users/gskerry/following{/other_user}","gists_url":"https://api.github.com/users/gskerry/gists{/gist_id}","starred_url":"https://api.github.com/users/gskerry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gskerry/subscriptions","organizations_url":"https://api.github.com/users/gskerry/orgs","repos_url":"https://api.github.com/users/gskerry/repos","events_url":"https://api.github.com/users/gskerry/events{/privacy}","received_events_url":"https://api.github.com/users/gskerry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gskerry/func.io","description":"Interoperable functional programming sequencer","fork":false,"url":"https://api.github.com/repos/gskerry/func.io","forks_url":"https://api.github.com/repos/gskerry/func.io/forks","keys_url":"https://api.github.com/repos/gskerry/func.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gskerry/func.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gskerry/func.io/teams","hooks_url":"https://api.github.com/repos/gskerry/func.io/hooks","issue_events_url":"https://api.github.com/repos/gskerry/func.io/issues/events{/number}","events_url":"https://api.github.com/repos/gskerry/func.io/events","assignees_url":"https://api.github.com/repos/gskerry/func.io/assignees{/user}","branches_url":"https://api.github.com/repos/gskerry/func.io/branches{/branch}","tags_url":"https://api.github.com/repos/gskerry/func.io/tags","blobs_url":"https://api.github.com/repos/gskerry/func.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gskerry/func.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gskerry/func.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/gskerry/func.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gskerry/func.io/statuses/{sha}","languages_url":"https://api.github.com/repos/gskerry/func.io/languages","stargazers_url":"https://api.github.com/repos/gskerry/func.io/stargazers","contributors_url":"https://api.github.com/repos/gskerry/func.io/contributors","subscribers_url":"https://api.github.com/repos/gskerry/func.io/subscribers","subscription_url":"https://api.github.com/repos/gskerry/func.io/subscription","commits_url":"https://api.github.com/repos/gskerry/func.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/gskerry/func.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/gskerry/func.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/gskerry/func.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/gskerry/func.io/contents/{+path}","compare_url":"https://api.github.com/repos/gskerry/func.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gskerry/func.io/merges","archive_url":"https://api.github.com/repos/gskerry/func.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gskerry/func.io/downloads","issues_url":"https://api.github.com/repos/gskerry/func.io/issues{/number}","pulls_url":"https://api.github.com/repos/gskerry/func.io/pulls{/number}","milestones_url":"https://api.github.com/repos/gskerry/func.io/milestones{/number}","notifications_url":"https://api.github.com/repos/gskerry/func.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gskerry/func.io/labels{/name}","releases_url":"https://api.github.com/repos/gskerry/func.io/releases{/id}","created_at":"2015-06-27T21:05:22Z","updated_at":"2015-06-27T21:11:55Z","pushed_at":"2015-06-29T05:43:38Z","git_url":"git://github.com/gskerry/func.io.git","ssh_url":"git@github.com:gskerry/func.io.git","clone_url":"https://github.com/gskerry/func.io.git","svn_url":"https://github.com/gskerry/func.io","homepage":"","size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"gskerry:master","ref":"master","sha":"5d46d2488279d7af452796e7e0be56c2566e86dd","user":{"login":"gskerry","id":8867156,"avatar_url":"https://avatars.githubusercontent.com/u/8867156?v=3","gravatar_id":"","url":"https://api.github.com/users/gskerry","html_url":"https://github.com/gskerry","followers_url":"https://api.github.com/users/gskerry/followers","following_url":"https://api.github.com/users/gskerry/following{/other_user}","gists_url":"https://api.github.com/users/gskerry/gists{/gist_id}","starred_url":"https://api.github.com/users/gskerry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gskerry/subscriptions","organizations_url":"https://api.github.com/users/gskerry/orgs","repos_url":"https://api.github.com/users/gskerry/repos","events_url":"https://api.github.com/users/gskerry/events{/privacy}","received_events_url":"https://api.github.com/users/gskerry/received_events","type":"User","site_admin":false},"repo":{"id":38175318,"name":"func.io","full_name":"gskerry/func.io","owner":{"login":"gskerry","id":8867156,"avatar_url":"https://avatars.githubusercontent.com/u/8867156?v=3","gravatar_id":"","url":"https://api.github.com/users/gskerry","html_url":"https://github.com/gskerry","followers_url":"https://api.github.com/users/gskerry/followers","following_url":"https://api.github.com/users/gskerry/following{/other_user}","gists_url":"https://api.github.com/users/gskerry/gists{/gist_id}","starred_url":"https://api.github.com/users/gskerry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gskerry/subscriptions","organizations_url":"https://api.github.com/users/gskerry/orgs","repos_url":"https://api.github.com/users/gskerry/repos","events_url":"https://api.github.com/users/gskerry/events{/privacy}","received_events_url":"https://api.github.com/users/gskerry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gskerry/func.io","description":"Interoperable functional programming sequencer","fork":false,"url":"https://api.github.com/repos/gskerry/func.io","forks_url":"https://api.github.com/repos/gskerry/func.io/forks","keys_url":"https://api.github.com/repos/gskerry/func.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gskerry/func.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gskerry/func.io/teams","hooks_url":"https://api.github.com/repos/gskerry/func.io/hooks","issue_events_url":"https://api.github.com/repos/gskerry/func.io/issues/events{/number}","events_url":"https://api.github.com/repos/gskerry/func.io/events","assignees_url":"https://api.github.com/repos/gskerry/func.io/assignees{/user}","branches_url":"https://api.github.com/repos/gskerry/func.io/branches{/branch}","tags_url":"https://api.github.com/repos/gskerry/func.io/tags","blobs_url":"https://api.github.com/repos/gskerry/func.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gskerry/func.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gskerry/func.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/gskerry/func.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gskerry/func.io/statuses/{sha}","languages_url":"https://api.github.com/repos/gskerry/func.io/languages","stargazers_url":"https://api.github.com/repos/gskerry/func.io/stargazers","contributors_url":"https://api.github.com/repos/gskerry/func.io/contributors","subscribers_url":"https://api.github.com/repos/gskerry/func.io/subscribers","subscription_url":"https://api.github.com/repos/gskerry/func.io/subscription","commits_url":"https://api.github.com/repos/gskerry/func.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/gskerry/func.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/gskerry/func.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/gskerry/func.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/gskerry/func.io/contents/{+path}","compare_url":"https://api.github.com/repos/gskerry/func.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gskerry/func.io/merges","archive_url":"https://api.github.com/repos/gskerry/func.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gskerry/func.io/downloads","issues_url":"https://api.github.com/repos/gskerry/func.io/issues{/number}","pulls_url":"https://api.github.com/repos/gskerry/func.io/pulls{/number}","milestones_url":"https://api.github.com/repos/gskerry/func.io/milestones{/number}","notifications_url":"https://api.github.com/repos/gskerry/func.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gskerry/func.io/labels{/name}","releases_url":"https://api.github.com/repos/gskerry/func.io/releases{/id}","created_at":"2015-06-27T21:05:22Z","updated_at":"2015-06-27T21:11:55Z","pushed_at":"2015-06-29T05:43:38Z","git_url":"git://github.com/gskerry/func.io.git","ssh_url":"git@github.com:gskerry/func.io.git","clone_url":"https://github.com/gskerry/func.io.git","svn_url":"https://github.com/gskerry/func.io","homepage":"","size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gskerry/func.io/pulls/8"},"html":{"href":"https://github.com/gskerry/func.io/pull/8"},"issue":{"href":"https://api.github.com/repos/gskerry/func.io/issues/8"},"comments":{"href":"https://api.github.com/repos/gskerry/func.io/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/gskerry/func.io/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/gskerry/func.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gskerry/func.io/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/gskerry/func.io/statuses/fecd824dd54ddd4fd9384c8c953b6e28cbe116e2"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":84,"deletions":38,"changed_files":6}}