{"action":"created","comment":{"url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/comments/26607517","id":26607517,"diff_hunk":"@@ -0,0 +1,50 @@\n+'use strict';\n+/**\n+ * This is a watch dog timer.  Think of it as a ticking\n+ * timebomb which will throw an explosion when it hasn't\n+ * been stopped or touched in `maxTime` seconds.  The\n+ * `WatchDog` will throw an `Error` with `msg` if the\n+ * timer is allowed to expire\n+ */\n+function WatchDog(maxTime, action) {\n+  this.maxTime = maxTime;\n+  if (typeof action === 'function') {\n+    this.action = action;\n+  } else {\n+    this.action = function() {\n+      throw new Error(action);","path":"watchdog.js","position":15,"original_position":15,"commit_id":"e9d8f63281dc5cd7ba66525cfd80b6cddcf3938b","original_commit_id":"e9d8f63281dc5cd7ba66525cfd80b6cddcf3938b","user":{"login":"jhford","id":607353,"avatar_url":"https://avatars.githubusercontent.com/u/607353?v=3","gravatar_id":"","url":"https://api.github.com/users/jhford","html_url":"https://github.com/jhford","followers_url":"https://api.github.com/users/jhford/followers","following_url":"https://api.github.com/users/jhford/following{/other_user}","gists_url":"https://api.github.com/users/jhford/gists{/gist_id}","starred_url":"https://api.github.com/users/jhford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhford/subscriptions","organizations_url":"https://api.github.com/users/jhford/orgs","repos_url":"https://api.github.com/users/jhford/repos","events_url":"https://api.github.com/users/jhford/events{/privacy}","received_events_url":"https://api.github.com/users/jhford/received_events","type":"User","site_admin":false},"body":"I've modified the WatchDog to be an eventemitter.  In `provisioner/provision.js`, though, I'm throwing an error still on the `expired` event.  Crashing node in this case is the desired behaviour, unless you know of a way that I can 'cancel' a promise from outside the promise... ","created_at":"2015-03-17T19:31:53Z","updated_at":"2015-03-17T19:31:53Z","html_url":"https://github.com/taskcluster/aws-provisioner/pull/8#discussion_r26607517","pull_request_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/comments/26607517"},"html":{"href":"https://github.com/taskcluster/aws-provisioner/pull/8#discussion_r26607517"},"pull_request":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/8","id":31334256,"html_url":"https://github.com/taskcluster/aws-provisioner/pull/8","diff_url":"https://github.com/taskcluster/aws-provisioner/pull/8.diff","patch_url":"https://github.com/taskcluster/aws-provisioner/pull/8.patch","issue_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/8","number":8,"state":"open","locked":false,"title":"I think we're ready for deployment!","user":{"login":"jhford","id":607353,"avatar_url":"https://avatars.githubusercontent.com/u/607353?v=3","gravatar_id":"","url":"https://api.github.com/users/jhford","html_url":"https://github.com/jhford","followers_url":"https://api.github.com/users/jhford/followers","following_url":"https://api.github.com/users/jhford/following{/other_user}","gists_url":"https://api.github.com/users/jhford/gists{/gist_id}","starred_url":"https://api.github.com/users/jhford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhford/subscriptions","organizations_url":"https://api.github.com/users/jhford/orgs","repos_url":"https://api.github.com/users/jhford/repos","events_url":"https://api.github.com/users/jhford/events{/privacy}","received_events_url":"https://api.github.com/users/jhford/received_events","type":"User","site_admin":false},"body":"Hey, can you take another look at the provisioner?  I have it running on heroku and it's going pretty well there.\r\n\r\nPlease let me know what you think","created_at":"2015-03-17T13:26:53Z","updated_at":"2015-03-17T19:31:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d586f04e5e79f377a6f6b58403651b3f096c12ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/8/commits","review_comments_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/8/comments","review_comment_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/8/comments","statuses_url":"https://api.github.com/repos/taskcluster/aws-provisioner/statuses/e9d8f63281dc5cd7ba66525cfd80b6cddcf3938b","head":{"label":"taskcluster:jhford-rewrite","ref":"jhford-rewrite","sha":"e9d8f63281dc5cd7ba66525cfd80b6cddcf3938b","user":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars.githubusercontent.com/u/6257436?v=3","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"repo":{"id":16123958,"name":"aws-provisioner","full_name":"taskcluster/aws-provisioner","owner":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars.githubusercontent.com/u/6257436?v=3","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskcluster/aws-provisioner","description":"AWS Provisioner for the TaskCluster","fork":false,"url":"https://api.github.com/repos/taskcluster/aws-provisioner","forks_url":"https://api.github.com/repos/taskcluster/aws-provisioner/forks","keys_url":"https://api.github.com/repos/taskcluster/aws-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskcluster/aws-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskcluster/aws-provisioner/teams","hooks_url":"https://api.github.com/repos/taskcluster/aws-provisioner/hooks","issue_events_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/taskcluster/aws-provisioner/events","assignees_url":"https://api.github.com/repos/taskcluster/aws-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/taskcluster/aws-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/taskcluster/aws-provisioner/tags","blobs_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskcluster/aws-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/taskcluster/aws-provisioner/languages","stargazers_url":"https://api.github.com/repos/taskcluster/aws-provisioner/stargazers","contributors_url":"https://api.github.com/repos/taskcluster/aws-provisioner/contributors","subscribers_url":"https://api.github.com/repos/taskcluster/aws-provisioner/subscribers","subscription_url":"https://api.github.com/repos/taskcluster/aws-provisioner/subscription","commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskcluster/aws-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskcluster/aws-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/taskcluster/aws-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskcluster/aws-provisioner/merges","archive_url":"https://api.github.com/repos/taskcluster/aws-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskcluster/aws-provisioner/downloads","issues_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/taskcluster/aws-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/taskcluster/aws-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskcluster/aws-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/taskcluster/aws-provisioner/releases{/id}","created_at":"2014-01-22T00:44:52Z","updated_at":"2015-03-09T21:39:52Z","pushed_at":"2015-03-17T13:27:03Z","git_url":"git://github.com/taskcluster/aws-provisioner.git","ssh_url":"git@github.com:taskcluster/aws-provisioner.git","clone_url":"https://github.com/taskcluster/aws-provisioner.git","svn_url":"https://github.com/taskcluster/aws-provisioner","homepage":null,"size":11035,"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":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"taskcluster:rewrite","ref":"rewrite","sha":"b1bba9aa432a67b837e4a0408d4d014e47e73740","user":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars.githubusercontent.com/u/6257436?v=3","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"repo":{"id":16123958,"name":"aws-provisioner","full_name":"taskcluster/aws-provisioner","owner":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars.githubusercontent.com/u/6257436?v=3","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskcluster/aws-provisioner","description":"AWS Provisioner for the TaskCluster","fork":false,"url":"https://api.github.com/repos/taskcluster/aws-provisioner","forks_url":"https://api.github.com/repos/taskcluster/aws-provisioner/forks","keys_url":"https://api.github.com/repos/taskcluster/aws-provisioner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskcluster/aws-provisioner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskcluster/aws-provisioner/teams","hooks_url":"https://api.github.com/repos/taskcluster/aws-provisioner/hooks","issue_events_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/events{/number}","events_url":"https://api.github.com/repos/taskcluster/aws-provisioner/events","assignees_url":"https://api.github.com/repos/taskcluster/aws-provisioner/assignees{/user}","branches_url":"https://api.github.com/repos/taskcluster/aws-provisioner/branches{/branch}","tags_url":"https://api.github.com/repos/taskcluster/aws-provisioner/tags","blobs_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskcluster/aws-provisioner/statuses/{sha}","languages_url":"https://api.github.com/repos/taskcluster/aws-provisioner/languages","stargazers_url":"https://api.github.com/repos/taskcluster/aws-provisioner/stargazers","contributors_url":"https://api.github.com/repos/taskcluster/aws-provisioner/contributors","subscribers_url":"https://api.github.com/repos/taskcluster/aws-provisioner/subscribers","subscription_url":"https://api.github.com/repos/taskcluster/aws-provisioner/subscription","commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskcluster/aws-provisioner/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskcluster/aws-provisioner/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskcluster/aws-provisioner/contents/{+path}","compare_url":"https://api.github.com/repos/taskcluster/aws-provisioner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskcluster/aws-provisioner/merges","archive_url":"https://api.github.com/repos/taskcluster/aws-provisioner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskcluster/aws-provisioner/downloads","issues_url":"https://api.github.com/repos/taskcluster/aws-provisioner/issues{/number}","pulls_url":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls{/number}","milestones_url":"https://api.github.com/repos/taskcluster/aws-provisioner/milestones{/number}","notifications_url":"https://api.github.com/repos/taskcluster/aws-provisioner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskcluster/aws-provisioner/labels{/name}","releases_url":"https://api.github.com/repos/taskcluster/aws-provisioner/releases{/id}","created_at":"2014-01-22T00:44:52Z","updated_at":"2015-03-09T21:39:52Z","pushed_at":"2015-03-17T13:27:03Z","git_url":"git://github.com/taskcluster/aws-provisioner.git","ssh_url":"git@github.com:taskcluster/aws-provisioner.git","clone_url":"https://github.com/taskcluster/aws-provisioner.git","svn_url":"https://github.com/taskcluster/aws-provisioner","homepage":null,"size":11035,"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":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/8"},"html":{"href":"https://github.com/taskcluster/aws-provisioner/pull/8"},"issue":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/8"},"comments":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/taskcluster/aws-provisioner/statuses/e9d8f63281dc5cd7ba66525cfd80b6cddcf3938b"}}}}