{"action":"created","comment":{"url":"https://api.github.com/repos/flynn/flynn/pulls/comments/34943557","id":34943557,"diff_hunk":"@@ -145,12 +154,69 @@ func (s *Scheduler) Sync() (err error) {\n \t\t\t\t\tcontinue\n \t\t\t\t}\n \t\t\t\tlog.Info(\"adding job\")\n-\t\t\t\ts.AddJob(NewJob(f, jobType, h.ID(), job.ID), appName, utils.JobMetaFromMetadata(job.Metadata))\n+\t\t\t\tj := NewJob(f, jobType, h.ID(), job.ID)\n+\t\t\t\ts.AddJob(j, appName, utils.JobMetaFromMetadata(job.Metadata))\n+\t\t\t\tfc.AddJob(j)\n \t\t\t}\n \t\t}\n \t}\n-\t// TODO rectify formations\n-\treturn\n+\tfor jobID := range unSyncedJobs {\n+\t\tdelete(s.jobs, jobID)","path":"controller/scheduler-v2/scheduler.go","position":56,"original_position":56,"commit_id":"d21dd18faeb080d8ae9575e9bfbe97937d0d11f7","original_commit_id":"d21dd18faeb080d8ae9575e9bfbe97937d0d11f7","user":{"login":"lmars","id":488515,"avatar_url":"https://avatars.githubusercontent.com/u/488515?v=3","gravatar_id":"","url":"https://api.github.com/users/lmars","html_url":"https://github.com/lmars","followers_url":"https://api.github.com/users/lmars/followers","following_url":"https://api.github.com/users/lmars/following{/other_user}","gists_url":"https://api.github.com/users/lmars/gists{/gist_id}","starred_url":"https://api.github.com/users/lmars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmars/subscriptions","organizations_url":"https://api.github.com/users/lmars/orgs","repos_url":"https://api.github.com/users/lmars/repos","events_url":"https://api.github.com/users/lmars/events{/privacy}","received_events_url":"https://api.github.com/users/lmars/received_events","type":"User","site_admin":false},"body":"I'm not really sure what this is achieving?","created_at":"2015-07-18T03:00:18Z","updated_at":"2015-07-18T03:00:18Z","html_url":"https://github.com/flynn/flynn/pull/1648#discussion_r34943557","pull_request_url":"https://api.github.com/repos/flynn/flynn/pulls/1648","_links":{"self":{"href":"https://api.github.com/repos/flynn/flynn/pulls/comments/34943557"},"html":{"href":"https://github.com/flynn/flynn/pull/1648#discussion_r34943557"},"pull_request":{"href":"https://api.github.com/repos/flynn/flynn/pulls/1648"}}},"pull_request":{"url":"https://api.github.com/repos/flynn/flynn/pulls/1648","id":39623550,"html_url":"https://github.com/flynn/flynn/pull/1648","diff_url":"https://github.com/flynn/flynn/pull/1648.diff","patch_url":"https://github.com/flynn/flynn/pull/1648.patch","issue_url":"https://api.github.com/repos/flynn/flynn/issues/1648","number":1648,"state":"open","locked":false,"title":"scheduler-v2: Formation Sync updates","user":{"login":"jzila","id":59594,"avatar_url":"https://avatars.githubusercontent.com/u/59594?v=3","gravatar_id":"","url":"https://api.github.com/users/jzila","html_url":"https://github.com/jzila","followers_url":"https://api.github.com/users/jzila/followers","following_url":"https://api.github.com/users/jzila/following{/other_user}","gists_url":"https://api.github.com/users/jzila/gists{/gist_id}","starred_url":"https://api.github.com/users/jzila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzila/subscriptions","organizations_url":"https://api.github.com/users/jzila/orgs","repos_url":"https://api.github.com/users/jzila/repos","events_url":"https://api.github.com/users/jzila/events{/privacy}","received_events_url":"https://api.github.com/users/jzila/received_events","type":"User","site_admin":false},"body":"TODO: still need to refactor tests to handle new formations.","created_at":"2015-07-09T20:15:32Z","updated_at":"2015-07-18T03:00:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eea023a821ef07d23e0fc31600036df77243513c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flynn/flynn/pulls/1648/commits","review_comments_url":"https://api.github.com/repos/flynn/flynn/pulls/1648/comments","review_comment_url":"https://api.github.com/repos/flynn/flynn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flynn/flynn/issues/1648/comments","statuses_url":"https://api.github.com/repos/flynn/flynn/statuses/d21dd18faeb080d8ae9575e9bfbe97937d0d11f7","head":{"label":"jzila:scheduler-v2-rebased","ref":"scheduler-v2-rebased","sha":"d21dd18faeb080d8ae9575e9bfbe97937d0d11f7","user":{"login":"jzila","id":59594,"avatar_url":"https://avatars.githubusercontent.com/u/59594?v=3","gravatar_id":"","url":"https://api.github.com/users/jzila","html_url":"https://github.com/jzila","followers_url":"https://api.github.com/users/jzila/followers","following_url":"https://api.github.com/users/jzila/following{/other_user}","gists_url":"https://api.github.com/users/jzila/gists{/gist_id}","starred_url":"https://api.github.com/users/jzila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzila/subscriptions","organizations_url":"https://api.github.com/users/jzila/orgs","repos_url":"https://api.github.com/users/jzila/repos","events_url":"https://api.github.com/users/jzila/events{/privacy}","received_events_url":"https://api.github.com/users/jzila/received_events","type":"User","site_admin":false},"repo":{"id":25329539,"name":"flynn","full_name":"jzila/flynn","owner":{"login":"jzila","id":59594,"avatar_url":"https://avatars.githubusercontent.com/u/59594?v=3","gravatar_id":"","url":"https://api.github.com/users/jzila","html_url":"https://github.com/jzila","followers_url":"https://api.github.com/users/jzila/followers","following_url":"https://api.github.com/users/jzila/following{/other_user}","gists_url":"https://api.github.com/users/jzila/gists{/gist_id}","starred_url":"https://api.github.com/users/jzila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzila/subscriptions","organizations_url":"https://api.github.com/users/jzila/orgs","repos_url":"https://api.github.com/users/jzila/repos","events_url":"https://api.github.com/users/jzila/events{/privacy}","received_events_url":"https://api.github.com/users/jzila/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jzila/flynn","description":"A next generation open source platform as a service (PaaS)","fork":true,"url":"https://api.github.com/repos/jzila/flynn","forks_url":"https://api.github.com/repos/jzila/flynn/forks","keys_url":"https://api.github.com/repos/jzila/flynn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jzila/flynn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jzila/flynn/teams","hooks_url":"https://api.github.com/repos/jzila/flynn/hooks","issue_events_url":"https://api.github.com/repos/jzila/flynn/issues/events{/number}","events_url":"https://api.github.com/repos/jzila/flynn/events","assignees_url":"https://api.github.com/repos/jzila/flynn/assignees{/user}","branches_url":"https://api.github.com/repos/jzila/flynn/branches{/branch}","tags_url":"https://api.github.com/repos/jzila/flynn/tags","blobs_url":"https://api.github.com/repos/jzila/flynn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jzila/flynn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jzila/flynn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jzila/flynn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jzila/flynn/statuses/{sha}","languages_url":"https://api.github.com/repos/jzila/flynn/languages","stargazers_url":"https://api.github.com/repos/jzila/flynn/stargazers","contributors_url":"https://api.github.com/repos/jzila/flynn/contributors","subscribers_url":"https://api.github.com/repos/jzila/flynn/subscribers","subscription_url":"https://api.github.com/repos/jzila/flynn/subscription","commits_url":"https://api.github.com/repos/jzila/flynn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jzila/flynn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jzila/flynn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jzila/flynn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jzila/flynn/contents/{+path}","compare_url":"https://api.github.com/repos/jzila/flynn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jzila/flynn/merges","archive_url":"https://api.github.com/repos/jzila/flynn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jzila/flynn/downloads","issues_url":"https://api.github.com/repos/jzila/flynn/issues{/number}","pulls_url":"https://api.github.com/repos/jzila/flynn/pulls{/number}","milestones_url":"https://api.github.com/repos/jzila/flynn/milestones{/number}","notifications_url":"https://api.github.com/repos/jzila/flynn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jzila/flynn/labels{/name}","releases_url":"https://api.github.com/repos/jzila/flynn/releases{/id}","created_at":"2014-10-17T00:37:28Z","updated_at":"2015-05-06T22:01:17Z","pushed_at":"2015-07-15T23:03:58Z","git_url":"git://github.com/jzila/flynn.git","ssh_url":"git@github.com:jzila/flynn.git","clone_url":"https://github.com/jzila/flynn.git","svn_url":"https://github.com/jzila/flynn","homepage":"https://flynn.io","size":17803,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"flynn:scheduler-v2-base","ref":"scheduler-v2-base","sha":"d42ab1c66266ce089f3b5d331dbe359bd27ee31d","user":{"login":"flynn","id":4973613,"avatar_url":"https://avatars.githubusercontent.com/u/4973613?v=3","gravatar_id":"","url":"https://api.github.com/users/flynn","html_url":"https://github.com/flynn","followers_url":"https://api.github.com/users/flynn/followers","following_url":"https://api.github.com/users/flynn/following{/other_user}","gists_url":"https://api.github.com/users/flynn/gists{/gist_id}","starred_url":"https://api.github.com/users/flynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flynn/subscriptions","organizations_url":"https://api.github.com/users/flynn/orgs","repos_url":"https://api.github.com/users/flynn/repos","events_url":"https://api.github.com/users/flynn/events{/privacy}","received_events_url":"https://api.github.com/users/flynn/received_events","type":"Organization","site_admin":false},"repo":{"id":11290232,"name":"flynn","full_name":"flynn/flynn","owner":{"login":"flynn","id":4973613,"avatar_url":"https://avatars.githubusercontent.com/u/4973613?v=3","gravatar_id":"","url":"https://api.github.com/users/flynn","html_url":"https://github.com/flynn","followers_url":"https://api.github.com/users/flynn/followers","following_url":"https://api.github.com/users/flynn/following{/other_user}","gists_url":"https://api.github.com/users/flynn/gists{/gist_id}","starred_url":"https://api.github.com/users/flynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flynn/subscriptions","organizations_url":"https://api.github.com/users/flynn/orgs","repos_url":"https://api.github.com/users/flynn/repos","events_url":"https://api.github.com/users/flynn/events{/privacy}","received_events_url":"https://api.github.com/users/flynn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flynn/flynn","description":"A next generation open source platform as a service (PaaS)","fork":false,"url":"https://api.github.com/repos/flynn/flynn","forks_url":"https://api.github.com/repos/flynn/flynn/forks","keys_url":"https://api.github.com/repos/flynn/flynn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flynn/flynn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flynn/flynn/teams","hooks_url":"https://api.github.com/repos/flynn/flynn/hooks","issue_events_url":"https://api.github.com/repos/flynn/flynn/issues/events{/number}","events_url":"https://api.github.com/repos/flynn/flynn/events","assignees_url":"https://api.github.com/repos/flynn/flynn/assignees{/user}","branches_url":"https://api.github.com/repos/flynn/flynn/branches{/branch}","tags_url":"https://api.github.com/repos/flynn/flynn/tags","blobs_url":"https://api.github.com/repos/flynn/flynn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flynn/flynn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flynn/flynn/git/refs{/sha}","trees_url":"https://api.github.com/repos/flynn/flynn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flynn/flynn/statuses/{sha}","languages_url":"https://api.github.com/repos/flynn/flynn/languages","stargazers_url":"https://api.github.com/repos/flynn/flynn/stargazers","contributors_url":"https://api.github.com/repos/flynn/flynn/contributors","subscribers_url":"https://api.github.com/repos/flynn/flynn/subscribers","subscription_url":"https://api.github.com/repos/flynn/flynn/subscription","commits_url":"https://api.github.com/repos/flynn/flynn/commits{/sha}","git_commits_url":"https://api.github.com/repos/flynn/flynn/git/commits{/sha}","comments_url":"https://api.github.com/repos/flynn/flynn/comments{/number}","issue_comment_url":"https://api.github.com/repos/flynn/flynn/issues/comments{/number}","contents_url":"https://api.github.com/repos/flynn/flynn/contents/{+path}","compare_url":"https://api.github.com/repos/flynn/flynn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flynn/flynn/merges","archive_url":"https://api.github.com/repos/flynn/flynn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flynn/flynn/downloads","issues_url":"https://api.github.com/repos/flynn/flynn/issues{/number}","pulls_url":"https://api.github.com/repos/flynn/flynn/pulls{/number}","milestones_url":"https://api.github.com/repos/flynn/flynn/milestones{/number}","notifications_url":"https://api.github.com/repos/flynn/flynn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flynn/flynn/labels{/name}","releases_url":"https://api.github.com/repos/flynn/flynn/releases{/id}","created_at":"2013-07-09T18:22:06Z","updated_at":"2015-07-18T01:06:34Z","pushed_at":"2015-07-17T19:38:50Z","git_url":"git://github.com/flynn/flynn.git","ssh_url":"git@github.com:flynn/flynn.git","clone_url":"https://github.com/flynn/flynn.git","svn_url":"https://github.com/flynn/flynn","homepage":"https://flynn.io","size":56341,"stargazers_count":3720,"watchers_count":3720,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":258,"mirror_url":null,"open_issues_count":186,"forks":258,"open_issues":186,"watchers":3720,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flynn/flynn/pulls/1648"},"html":{"href":"https://github.com/flynn/flynn/pull/1648"},"issue":{"href":"https://api.github.com/repos/flynn/flynn/issues/1648"},"comments":{"href":"https://api.github.com/repos/flynn/flynn/issues/1648/comments"},"review_comments":{"href":"https://api.github.com/repos/flynn/flynn/pulls/1648/comments"},"review_comment":{"href":"https://api.github.com/repos/flynn/flynn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flynn/flynn/pulls/1648/commits"},"statuses":{"href":"https://api.github.com/repos/flynn/flynn/statuses/d21dd18faeb080d8ae9575e9bfbe97937d0d11f7"}}}}