{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/149704222","pull_request_review_id":75139461,"id":149704222,"diff_hunk":"@@ -34,24 +34,27 @@\n MOBILE_UCR_RANDOM_THRESHOLD = 1000\n \n \n-def _should_sync(restore_state):\n+def _should_sync(restore_state, is_v2):\n     last_sync_log = restore_state.last_sync_log\n     if not last_sync_log or restore_state.overwrite_cache:\n         return True\n \n-    sync_interval = restore_state.restore_user.get_mobile_ucr_sync_interval()\n-    if sync_interval is None and restore_state.params.app:\n-        app = restore_state.params.app\n-        if restore_state.params.app.copy_of:\n-            # get sync interval from latest app version so that we don't have to deploy a new version\n-            # to make changes to the sync interval\n-            try:\n-                app = get_brief_app(restore_state.domain, restore_state.params.app.copy_of)\n-            except NoResultFound:\n-                pass\n-        sync_interval = app.mobile_ucr_sync_interval\n-    if sync_interval is None:\n-        sync_interval = restore_state.project.default_mobile_ucr_sync_interval\n+    sync_interval = None\n+    if not is_v2:\n+        # in v2 sync delay is handled per report in the app","path":"corehq/apps/app_manager/fixtures/mobile_ucr.py","position":25,"original_position":25,"commit_id":"92f41a5c6ff722780605a2eef27ced65f9a67a2b","original_commit_id":"92f41a5c6ff722780605a2eef27ced65f9a67a2b","user":{"login":"emord","id":1471773,"avatar_url":"https://avatars0.githubusercontent.com/u/1471773?v=4","gravatar_id":"","url":"https://api.github.com/users/emord","html_url":"https://github.com/emord","followers_url":"https://api.github.com/users/emord/followers","following_url":"https://api.github.com/users/emord/following{/other_user}","gists_url":"https://api.github.com/users/emord/gists{/gist_id}","starred_url":"https://api.github.com/users/emord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emord/subscriptions","organizations_url":"https://api.github.com/users/emord/orgs","repos_url":"https://api.github.com/users/emord/repos","events_url":"https://api.github.com/users/emord/events{/privacy}","received_events_url":"https://api.github.com/users/emord/received_events","type":"User","site_admin":false},"body":"Cool. I'm not against this change, so happy to merge once tests pass.\r\n\r\nwe could also use the `<input min>` attribute to specify a minimum on each input to make it less confusing, although we may want some warning that the minimum is due to an app /domain level setting","created_at":"2017-11-08T15:35:33Z","updated_at":"2017-11-08T15:35:33Z","html_url":"https://github.com/dimagi/commcare-hq/pull/18448#discussion_r149704222","pull_request_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/18448","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/149704222"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/18448#discussion_r149704222"},"pull_request":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/18448"}},"in_reply_to_id":149696341},"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/18448","id":151366536,"html_url":"https://github.com/dimagi/commcare-hq/pull/18448","diff_url":"https://github.com/dimagi/commcare-hq/pull/18448.diff","patch_url":"https://github.com/dimagi/commcare-hq/pull/18448.patch","issue_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/18448","number":18448,"state":"open","locked":false,"title":" ignore user and domain sync_delay for v2","user":{"login":"snopoke","id":249606,"avatar_url":"https://avatars3.githubusercontent.com/u/249606?v=4","gravatar_id":"","url":"https://api.github.com/users/snopoke","html_url":"https://github.com/snopoke","followers_url":"https://api.github.com/users/snopoke/followers","following_url":"https://api.github.com/users/snopoke/following{/other_user}","gists_url":"https://api.github.com/users/snopoke/gists{/gist_id}","starred_url":"https://api.github.com/users/snopoke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snopoke/subscriptions","organizations_url":"https://api.github.com/users/snopoke/orgs","repos_url":"https://api.github.com/users/snopoke/repos","events_url":"https://api.github.com/users/snopoke/events{/privacy}","received_events_url":"https://api.github.com/users/snopoke/received_events","type":"User","site_admin":false},"body":"When looking at this I was also wondering if we need a way to override this for specific users e.g. during training or for 'test' users.","created_at":"2017-11-08T12:13:35Z","updated_at":"2017-11-08T15:35:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8b4ef8b7d8f30057b7ab04c0733c1842e614e9e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/18448/commits","review_comments_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/18448/comments","review_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/18448/comments","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/92f41a5c6ff722780605a2eef27ced65f9a67a2b","head":{"label":"dimagi:sk/mobile-ucr","ref":"sk/mobile-ucr","sha":"92f41a5c6ff722780605a2eef27ced65f9a67a2b","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"name":"commcare-hq","full_name":"dimagi/commcare-hq","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcare-hq/deployments","created_at":"2009-07-09T17:00:07Z","updated_at":"2017-10-26T11:33:23Z","pushed_at":"2017-11-08T15:32:14Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"https://www.commcarehq.org","size":430725,"stargazers_count":82,"watchers_count":82,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":73,"forks":97,"open_issues":73,"watchers":82,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"5d7e8296ac12f97c8ef4de3d60074773f74b38bd","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"name":"commcare-hq","full_name":"dimagi/commcare-hq","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcare-hq/deployments","created_at":"2009-07-09T17:00:07Z","updated_at":"2017-10-26T11:33:23Z","pushed_at":"2017-11-08T15:32:14Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"https://www.commcarehq.org","size":430725,"stargazers_count":82,"watchers_count":82,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":73,"forks":97,"open_issues":73,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/18448"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/18448"},"issue":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/18448"},"comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/18448/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/18448/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/18448/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/commcare-hq/statuses/92f41a5c6ff722780605a2eef27ced65f9a67a2b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"emord"}}