{"action":"created","comment":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments/201181025","pull_request_review_id":135628038,"id":201181025,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTE4MTAyNQ==","diff_hunk":"@@ -100,5 +89,12 @@ def self.create_placeholder!(user_id:, pd_workshop_id:, day:, form_id:, submissi\n         submission_id: submission_id\n       )\n     end\n+\n+    # @override\n+    def duplicate?","path":"dashboard/app/models/pd/workshop_daily_survey.rb","position":24,"original_position":24,"commit_id":"ea0d236fc1278b83e4892b8ce95fa941a7ae9830","original_commit_id":"ea0d236fc1278b83e4892b8ce95fa941a7ae9830","user":{"login":"mehalshah","id":14246419,"node_id":"MDQ6VXNlcjE0MjQ2NDE5","avatar_url":"https://avatars0.githubusercontent.com/u/14246419?v=4","gravatar_id":"","url":"https://api.github.com/users/mehalshah","html_url":"https://github.com/mehalshah","followers_url":"https://api.github.com/users/mehalshah/followers","following_url":"https://api.github.com/users/mehalshah/following{/other_user}","gists_url":"https://api.github.com/users/mehalshah/gists{/gist_id}","starred_url":"https://api.github.com/users/mehalshah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mehalshah/subscriptions","organizations_url":"https://api.github.com/users/mehalshah/orgs","repos_url":"https://api.github.com/users/mehalshah/repos","events_url":"https://api.github.com/users/mehalshah/events{/privacy}","received_events_url":"https://api.github.com/users/mehalshah/received_events","type":"User","site_admin":false},"body":"You also have the :session_id - any reason to use the combo of workshop_id and day instead of just session ID?","created_at":"2018-07-09T23:44:23Z","updated_at":"2018-07-09T23:46:23Z","html_url":"https://github.com/code-dot-org/code-dot-org/pull/23595#discussion_r201181025","pull_request_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23595","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/comments/201181025"},"html":{"href":"https://github.com/code-dot-org/code-dot-org/pull/23595#discussion_r201181025"},"pull_request":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23595"}}},"pull_request":{"url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23595","id":200241921,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMjQxOTIx","html_url":"https://github.com/code-dot-org/code-dot-org/pull/23595","diff_url":"https://github.com/code-dot-org/code-dot-org/pull/23595.diff","patch_url":"https://github.com/code-dot-org/code-dot-org/pull/23595.patch","issue_url":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/23595","number":23595,"state":"open","locked":false,"title":"Change the way we sync JotForm answers so it's more robust, and separate","user":{"login":"aoby","id":8405316,"node_id":"MDQ6VXNlcjg0MDUzMTY=","avatar_url":"https://avatars0.githubusercontent.com/u/8405316?v=4","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":"the cronjob into two.\r\n\r\nRemaining work from https://github.com/code-dot-org/code-dot-org/pull/23497:\r\n 1. separate into 2 jobs\r\n    1. frequent sync that pulls answers for known placeholders\r\n    2. less frequent (daily) sanity check job that syncs everything\r\n 2. Add check for missing environment (confirm that all answers are empty).\r\n\r\nAlso:\r\n 1. Generally improve the reliability of JotForm sync:\r\n    1. Retrieve up to 1000 submissions at a time, in batches, until complete.\r\n    2. Collect errors but don't fail the whole set. Bail out early if a complete batch fails though\r\n    3. Update the SurveyQuestion's `last_submission_id` (see https://github.com/code-dot-org/code-dot-org/pull/23593) to the highest  successfully parsed answer for each form before encountering any errors, even if we skip it (e.g. wrong environment). This means if some fail, the next sync will start by retrying the first failed one. Otherwise it will just look for new results.\r\n 2. Add temporary GET submit* routes to ease the transition. We will need to update the forms in JotForm to use the POST routes, and we can't do that until after we deploy. I have already updated the forms to conditionally use the `submitRedirect` param if it's provided, but GET vs. POST is a form setting that can't be dynamic or conditional.\r\n\r\n","created_at":"2018-07-09T23:00:26Z","updated_at":"2018-07-09T23:46:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"564c2444083da103f7393ce1baa0fa88cb273cc8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23595/commits","review_comments_url":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23595/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/23595/comments","statuses_url":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/ea0d236fc1278b83e4892b8ce95fa941a7ae9830","head":{"label":"code-dot-org:jotform-dedupe2","ref":"jotform-dedupe2","sha":"ea0d236fc1278b83e4892b8ce95fa941a7ae9830","user":{"login":"code-dot-org","id":5124627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjQ2Mjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5124627?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyNDI1MDAwOQ==","name":"code-dot-org","full_name":"code-dot-org/code-dot-org","owner":{"login":"code-dot-org","id":5124627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjQ2Mjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5124627?v=4","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":"2018-07-09T23:41:12Z","pushed_at":"2018-07-09T23:40:56Z","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":7919907,"stargazers_count":327,"watchers_count":327,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":188,"mirror_url":null,"archived":false,"open_issues_count":138,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":188,"open_issues":138,"watchers":327,"default_branch":"staging"}},"base":{"label":"code-dot-org:jotform-dedupe-migration","ref":"jotform-dedupe-migration","sha":"dacacd68cb9e6751a5b7ea18f6b2f6c87fcf991f","user":{"login":"code-dot-org","id":5124627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjQ2Mjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5124627?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyNDI1MDAwOQ==","name":"code-dot-org","full_name":"code-dot-org/code-dot-org","owner":{"login":"code-dot-org","id":5124627,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxMjQ2Mjc=","avatar_url":"https://avatars2.githubusercontent.com/u/5124627?v=4","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":"2018-07-09T23:41:12Z","pushed_at":"2018-07-09T23:40:56Z","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":7919907,"stargazers_count":327,"watchers_count":327,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":188,"mirror_url":null,"archived":false,"open_issues_count":138,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":188,"open_issues":138,"watchers":327,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23595"},"html":{"href":"https://github.com/code-dot-org/code-dot-org/pull/23595"},"issue":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/23595"},"comments":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/issues/23595/comments"},"review_comments":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/pulls/23595/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/23595/commits"},"statuses":{"href":"https://api.github.com/repos/code-dot-org/code-dot-org/statuses/ea0d236fc1278b83e4892b8ce95fa941a7ae9830"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mehalshah"}}