{"action":"closed","number":10007,"pull_request":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/10007","id":81144358,"html_url":"https://github.com/code-dot-org/code-dot-org/pull/10007","diff_url":"https://github.com/code-dot-org/code-dot-org/pull/10007.diff","patch_url":"https://github.com/code-dot-org/code-dot-org/pull/10007.patch","issue_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/10007","number":10007,"state":"closed","locked":false,"title":"Added and fixed tracking and error reporting around async workshop processing. ","user":{"login":"aoby","id":8405316,"avatar_url":"https://avatars.githubusercontent.com/u/8405316?v=3","gravatar_id":"","url":"https://api.github.com/users/aoby","html_url":"https://github.com/aoby","followers_url":"https://api.github.com/users/aoby/followers","following_url":"https://api.github.com/users/aoby/following{/other_user}","gists_url":"https://api.github.com/users/aoby/gists{/gist_id}","starred_url":"https://api.github.com/users/aoby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aoby/subscriptions","organizations_url":"https://api.github.com/users/aoby/orgs","repos_url":"https://api.github.com/users/aoby/repos","events_url":"https://api.github.com/users/aoby/events{/privacy}","received_events_url":"https://api.github.com/users/aoby/received_events","type":"User","site_admin":false},"body":" 1. Start filling in the new workshops' `processed_at` field.\r\n\r\n 1. Added honeybadger logging whenever processing a workshop fails. As of now it's fairly invisible unless we're specifically monitoring the sqs dead letter queue or watching log files. \r\n\r\n 1.  Made sending exit surveys idempotent by inspecting `enrollment.survey_sent_at` and skipping any that have already been sent. Now reprocessing a workshop is harmless.\r\n\r\n 1. Removed old code around creating enrollments for unenrolled\r\nattendees that is no longer needed now that joining the section requires\r\nconfirmation, creates an enrollment, and ensures the user is a teacher.\r\n\r\n 1. Fixed a bug that was preventing the `enrollment.completed_survey_id` field from being filled in upon completing a survey. This hasn't shown up yet because the survey report is not complete, and the scripted reports I've been generating work fine since they start from the other side (pegasus forms) and then query enrollments based on `source_id`.\r\n\r\n After some experimenting I found out that in `Sequel`, you can query like `DB[:my_table][id: my_id]`, but for updates it must be `DB[:my_table].where(id: my_id).update...`. Attempting to update with the former syntax silently fails. It returns a hash of what would be the updated row but does not save it to the DB :(.\r\n\r\nI'm working on a script (subsequent PR) to update the missing data based on which survey emails were sent and which survey responses we have, figure out which emails haven't gone out and send them.","created_at":"2016-08-12T16:11:38Z","updated_at":"2016-08-15T18:44:45Z","closed_at":"2016-08-15T18:44:45Z","merged_at":"2016-08-15T18:44:45Z","merge_commit_sha":"90faac5ddee48453630df18478def6bd5bb378a8","assignee":{"login":"jeremydstone","id":19172895,"avatar_url":"https://avatars.githubusercontent.com/u/19172895?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremydstone","html_url":"https://github.com/jeremydstone","followers_url":"https://api.github.com/users/jeremydstone/followers","following_url":"https://api.github.com/users/jeremydstone/following{/other_user}","gists_url":"https://api.github.com/users/jeremydstone/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremydstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremydstone/subscriptions","organizations_url":"https://api.github.com/users/jeremydstone/orgs","repos_url":"https://api.github.com/users/jeremydstone/repos","events_url":"https://api.github.com/users/jeremydstone/events{/privacy}","received_events_url":"https://api.github.com/users/jeremydstone/received_events","type":"User","site_admin":false},"assignees":[{"login":"jeremydstone","id":19172895,"avatar_url":"https://avatars.githubusercontent.com/u/19172895?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremydstone","html_url":"https://github.com/jeremydstone","followers_url":"https://api.github.com/users/jeremydstone/followers","following_url":"https://api.github.com/users/jeremydstone/following{/other_user}","gists_url":"https://api.github.com/users/jeremydstone/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremydstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremydstone/subscriptions","organizations_url":"https://api.github.com/users/jeremydstone/orgs","repos_url":"https://api.github.com/users/jeremydstone/repos","events_url":"https://api.github.com/users/jeremydstone/events{/privacy}","received_events_url":"https://api.github.com/users/jeremydstone/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/10007/commits","review_comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/10007/comments","review_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/10007/comments","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/c650f3aa85aa626c35676620876ff0a6b4413b25","head":{"label":"code-dot-org:pd-workshop-survey-fix","ref":"pd-workshop-survey-fix","sha":"c650f3aa85aa626c35676620876ff0a6b4413b25","user":{"login":"code-dot-org","id":5124627,"avatar_url":"https://avatars.githubusercontent.com/u/5124627?v=3","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"repo":{"id":24250009,"name":"code-dot-org","full_name":"code-dot-org/code-dot-org","owner":{"login":"code-dot-org","id":5124627,"avatar_url":"https://avatars.githubusercontent.com/u/5124627?v=3","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-dot-org/code-dot-org","description":"The code powering code.org and studio.code.org","fork":false,"url":"https://api.github.com/repos/code-dot-org/code-dot-org","forks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/forks","keys_url":"https://api.github.com/repos/code-dot-org/code-dot-org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-dot-org/code-dot-org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-dot-org/code-dot-org/teams","hooks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/hooks","issue_events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/events{/number}","events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/events","assignees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/assignees{/user}","branches_url":"https://api.github.com/repos/code-dot-org/code-dot-org/branches{/branch}","tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/tags","blobs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/{sha}","languages_url":"https://api.github.com/repos/code-dot-org/code-dot-org/languages","stargazers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/stargazers","contributors_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contributors","subscribers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscribers","subscription_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscription","commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contents/{+path}","compare_url":"https://api.github.com/repos/code-dot-org/code-dot-org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-dot-org/code-dot-org/merges","archive_url":"https://api.github.com/repos/code-dot-org/code-dot-org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-dot-org/code-dot-org/downloads","issues_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues{/number}","pulls_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls{/number}","milestones_url":"https://api.github.com/repos/code-dot-org/code-dot-org/milestones{/number}","notifications_url":"https://api.github.com/repos/code-dot-org/code-dot-org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-dot-org/code-dot-org/labels{/name}","releases_url":"https://api.github.com/repos/code-dot-org/code-dot-org/releases{/id}","deployments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/deployments","created_at":"2014-09-20T00:46:11Z","updated_at":"2016-08-15T03:16:44Z","pushed_at":"2016-08-15T18:44:45Z","git_url":"git://github.com/code-dot-org/code-dot-org.git","ssh_url":"git@github.com:code-dot-org/code-dot-org.git","clone_url":"https://github.com/code-dot-org/code-dot-org.git","svn_url":"https://github.com/code-dot-org/code-dot-org","homepage":"http://code.org","size":4870510,"stargazers_count":135,"watchers_count":135,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":54,"forks":85,"open_issues":54,"watchers":135,"default_branch":"staging"}},"base":{"label":"code-dot-org:staging","ref":"staging","sha":"63cf51e671639f7a93ee917f116c1ceba72beb8d","user":{"login":"code-dot-org","id":5124627,"avatar_url":"https://avatars.githubusercontent.com/u/5124627?v=3","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"repo":{"id":24250009,"name":"code-dot-org","full_name":"code-dot-org/code-dot-org","owner":{"login":"code-dot-org","id":5124627,"avatar_url":"https://avatars.githubusercontent.com/u/5124627?v=3","gravatar_id":"","url":"https://api.github.com/users/code-dot-org","html_url":"https://github.com/code-dot-org","followers_url":"https://api.github.com/users/code-dot-org/followers","following_url":"https://api.github.com/users/code-dot-org/following{/other_user}","gists_url":"https://api.github.com/users/code-dot-org/gists{/gist_id}","starred_url":"https://api.github.com/users/code-dot-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-dot-org/subscriptions","organizations_url":"https://api.github.com/users/code-dot-org/orgs","repos_url":"https://api.github.com/users/code-dot-org/repos","events_url":"https://api.github.com/users/code-dot-org/events{/privacy}","received_events_url":"https://api.github.com/users/code-dot-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-dot-org/code-dot-org","description":"The code powering code.org and studio.code.org","fork":false,"url":"https://api.github.com/repos/code-dot-org/code-dot-org","forks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/forks","keys_url":"https://api.github.com/repos/code-dot-org/code-dot-org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-dot-org/code-dot-org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-dot-org/code-dot-org/teams","hooks_url":"https://api.github.com/repos/code-dot-org/code-dot-org/hooks","issue_events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/events{/number}","events_url":"https://api.github.com/repos/code-dot-org/code-dot-org/events","assignees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/assignees{/user}","branches_url":"https://api.github.com/repos/code-dot-org/code-dot-org/branches{/branch}","tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/tags","blobs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/{sha}","languages_url":"https://api.github.com/repos/code-dot-org/code-dot-org/languages","stargazers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/stargazers","contributors_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contributors","subscribers_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscribers","subscription_url":"https://api.github.com/repos/code-dot-org/code-dot-org/subscription","commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-dot-org/code-dot-org/contents/{+path}","compare_url":"https://api.github.com/repos/code-dot-org/code-dot-org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-dot-org/code-dot-org/merges","archive_url":"https://api.github.com/repos/code-dot-org/code-dot-org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-dot-org/code-dot-org/downloads","issues_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues{/number}","pulls_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls{/number}","milestones_url":"https://api.github.com/repos/code-dot-org/code-dot-org/milestones{/number}","notifications_url":"https://api.github.com/repos/code-dot-org/code-dot-org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-dot-org/code-dot-org/labels{/name}","releases_url":"https://api.github.com/repos/code-dot-org/code-dot-org/releases{/id}","deployments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/deployments","created_at":"2014-09-20T00:46:11Z","updated_at":"2016-08-15T03:16:44Z","pushed_at":"2016-08-15T18:44:45Z","git_url":"git://github.com/code-dot-org/code-dot-org.git","ssh_url":"git@github.com:code-dot-org/code-dot-org.git","clone_url":"https://github.com/code-dot-org/code-dot-org.git","svn_url":"https://github.com/code-dot-org/code-dot-org","homepage":"http://code.org","size":4870510,"stargazers_count":135,"watchers_count":135,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":54,"forks":85,"open_issues":54,"watchers":135,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/10007"},"html":{"href":"https://github.com/code-dot-org/code-dot-org/pull/10007"},"issue":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/10007"},"comments":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/10007/comments"},"review_comments":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/10007/comments"},"review_comment":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/10007/commits"},"statuses":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/c650f3aa85aa626c35676620876ff0a6b4413b25"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"aoby","id":8405316,"avatar_url":"https://avatars.githubusercontent.com/u/8405316?v=3","gravatar_id":"","url":"https://api.github.com/users/aoby","html_url":"https://github.com/aoby","followers_url":"https://api.github.com/users/aoby/followers","following_url":"https://api.github.com/users/aoby/following{/other_user}","gists_url":"https://api.github.com/users/aoby/gists{/gist_id}","starred_url":"https://api.github.com/users/aoby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aoby/subscriptions","organizations_url":"https://api.github.com/users/aoby/orgs","repos_url":"https://api.github.com/users/aoby/repos","events_url":"https://api.github.com/users/aoby/events{/privacy}","received_events_url":"https://api.github.com/users/aoby/received_events","type":"User","site_admin":false},"comments":1,"review_comments":4,"commits":3,"additions":17,"deletions":96,"changed_files":7}}
{"actor":{"display_login":"aoby"}}