{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin-web-common/pulls/comments/129146413","pull_request_review_id":51890059,"id":129146413,"diff_hunk":"@@ -602,13 +602,17 @@ DataService.prototype.createStream = function(resource, name, context, opts, isR\n //            pollInterval: in milliseconds, how long to wait between polling the server\n //                    only applies if poll=true.  Default is 5000.\n //            http:   similar to .get, etc. at this point, only used to pass http.params for filtering\n+//            suppressDigest: will skip the $apply & avoid triggering a digest loop","path":"src/services/dataService.js","position":4,"original_position":4,"commit_id":"48b766ecd23dfd8747d0026e1840798e6974ae4a","original_commit_id":"fb09cc94f8263e2364bd51454e62479df171a126","user":{"login":"benjaminapetersen","id":280512,"avatar_url":"https://avatars0.githubusercontent.com/u/280512?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminapetersen","html_url":"https://github.com/benjaminapetersen","followers_url":"https://api.github.com/users/benjaminapetersen/followers","following_url":"https://api.github.com/users/benjaminapetersen/following{/other_user}","gists_url":"https://api.github.com/users/benjaminapetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminapetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminapetersen/subscriptions","organizations_url":"https://api.github.com/users/benjaminapetersen/orgs","repos_url":"https://api.github.com/users/benjaminapetersen/repos","events_url":"https://api.github.com/users/benjaminapetersen/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminapetersen/received_events","type":"User","site_admin":false},"body":"Yeah, digest is a lot more specific. Sounds good to me.","created_at":"2017-07-24T20:35:30Z","updated_at":"2017-07-24T20:35:30Z","html_url":"https://github.com/openshift/origin-web-common/pull/129#discussion_r129146413","pull_request_url":"https://api.github.com/repos/openshift/origin-web-common/pulls/129","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin-web-common/pulls/comments/129146413"},"html":{"href":"https://github.com/openshift/origin-web-common/pull/129#discussion_r129146413"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin-web-common/pulls/129"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin-web-common/pulls/129","id":132119497,"html_url":"https://github.com/openshift/origin-web-common/pull/129","diff_url":"https://github.com/openshift/origin-web-common/pull/129.diff","patch_url":"https://github.com/openshift/origin-web-common/pull/129.patch","issue_url":"https://api.github.com/repos/openshift/origin-web-common/issues/129","number":129,"state":"open","locked":false,"title":"Add opts.suppressDigest for DataService.watch","user":{"login":"benjaminapetersen","id":280512,"avatar_url":"https://avatars0.githubusercontent.com/u/280512?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminapetersen","html_url":"https://github.com/benjaminapetersen","followers_url":"https://api.github.com/users/benjaminapetersen/followers","following_url":"https://api.github.com/users/benjaminapetersen/following{/other_user}","gists_url":"https://api.github.com/users/benjaminapetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminapetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminapetersen/subscriptions","organizations_url":"https://api.github.com/users/benjaminapetersen/orgs","repos_url":"https://api.github.com/users/benjaminapetersen/repos","events_url":"https://api.github.com/users/benjaminapetersen/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminapetersen/received_events","type":"User","site_admin":false},"body":"- provides mechanism to keep WebSockets from spamming the `$digest` loop\r\n- flips `invokeApply` passed to the internal `$timeout` calls,\r\n  stopping a `$digest` loop & avoiding a render.\r\n- `DataService._watchOpOnMessage` also honors the `suppressDigest` flag,\r\n  which is plumbed down through `.watch` -> `.startListOp` -> `._listOpComplete` -> `._startWatchOp` -> `._watchOpOnMessage`\r\n\r\nexample usage:\r\n\r\n```javascript \r\nDataService.watch(resource, context, (data) => {\r\n  // optionally call $applyAsync here in controlling code\r\n  // to manually run a $digest\r\n  $scope.$applyAsync(() => {\r\n   // do stuff with data here\r\n  });\r\n}, { suppressDigest: true });\r\n\r\n// or debounced \r\nDataService.watch(resource, context, _.debounce((data) => {\r\n  // $apply here, inside debounce\r\n}, 400), { suppressDigest: true });\r\n```\r\n\r\n@spadgett @jwforres for review ","created_at":"2017-07-24T18:51:45Z","updated_at":"2017-07-24T20:35:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71811fc96effd60f535728b957ae6a0232cfb211","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin-web-common/pulls/129/commits","review_comments_url":"https://api.github.com/repos/openshift/origin-web-common/pulls/129/comments","review_comment_url":"https://api.github.com/repos/openshift/origin-web-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin-web-common/issues/129/comments","statuses_url":"https://api.github.com/repos/openshift/origin-web-common/statuses/48b766ecd23dfd8747d0026e1840798e6974ae4a","head":{"label":"benjaminapetersen:watch-suppress-digest","ref":"watch-suppress-digest","sha":"48b766ecd23dfd8747d0026e1840798e6974ae4a","user":{"login":"benjaminapetersen","id":280512,"avatar_url":"https://avatars0.githubusercontent.com/u/280512?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminapetersen","html_url":"https://github.com/benjaminapetersen","followers_url":"https://api.github.com/users/benjaminapetersen/followers","following_url":"https://api.github.com/users/benjaminapetersen/following{/other_user}","gists_url":"https://api.github.com/users/benjaminapetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminapetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminapetersen/subscriptions","organizations_url":"https://api.github.com/users/benjaminapetersen/orgs","repos_url":"https://api.github.com/users/benjaminapetersen/repos","events_url":"https://api.github.com/users/benjaminapetersen/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminapetersen/received_events","type":"User","site_admin":false},"repo":{"id":87105141,"name":"origin-web-common","full_name":"benjaminapetersen/origin-web-common","owner":{"login":"benjaminapetersen","id":280512,"avatar_url":"https://avatars0.githubusercontent.com/u/280512?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminapetersen","html_url":"https://github.com/benjaminapetersen","followers_url":"https://api.github.com/users/benjaminapetersen/followers","following_url":"https://api.github.com/users/benjaminapetersen/following{/other_user}","gists_url":"https://api.github.com/users/benjaminapetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminapetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminapetersen/subscriptions","organizations_url":"https://api.github.com/users/benjaminapetersen/orgs","repos_url":"https://api.github.com/users/benjaminapetersen/repos","events_url":"https://api.github.com/users/benjaminapetersen/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminapetersen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benjaminapetersen/origin-web-common","description":null,"fork":true,"url":"https://api.github.com/repos/benjaminapetersen/origin-web-common","forks_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/forks","keys_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/teams","hooks_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/hooks","issue_events_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/issues/events{/number}","events_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/events","assignees_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/assignees{/user}","branches_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/branches{/branch}","tags_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/tags","blobs_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/statuses/{sha}","languages_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/languages","stargazers_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/stargazers","contributors_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/contributors","subscribers_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/subscribers","subscription_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/subscription","commits_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/contents/{+path}","compare_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/merges","archive_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/downloads","issues_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/issues{/number}","pulls_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/pulls{/number}","milestones_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/milestones{/number}","notifications_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/labels{/name}","releases_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/releases{/id}","deployments_url":"https://api.github.com/repos/benjaminapetersen/origin-web-common/deployments","created_at":"2017-04-03T18:07:25Z","updated_at":"2017-04-03T18:07:27Z","pushed_at":"2017-07-24T20:34:31Z","git_url":"git://github.com/benjaminapetersen/origin-web-common.git","ssh_url":"git@github.com:benjaminapetersen/origin-web-common.git","clone_url":"https://github.com/benjaminapetersen/origin-web-common.git","svn_url":"https://github.com/benjaminapetersen/origin-web-common","homepage":null,"size":718,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"openshift:master","ref":"master","sha":"27a8f85a036218863611d8b30889e352ccfea320","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":81274150,"name":"origin-web-common","full_name":"openshift/origin-web-common","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin-web-common","description":null,"fork":false,"url":"https://api.github.com/repos/openshift/origin-web-common","forks_url":"https://api.github.com/repos/openshift/origin-web-common/forks","keys_url":"https://api.github.com/repos/openshift/origin-web-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin-web-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin-web-common/teams","hooks_url":"https://api.github.com/repos/openshift/origin-web-common/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin-web-common/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin-web-common/events","assignees_url":"https://api.github.com/repos/openshift/origin-web-common/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin-web-common/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin-web-common/tags","blobs_url":"https://api.github.com/repos/openshift/origin-web-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin-web-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin-web-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin-web-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin-web-common/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin-web-common/languages","stargazers_url":"https://api.github.com/repos/openshift/origin-web-common/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin-web-common/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin-web-common/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin-web-common/subscription","commits_url":"https://api.github.com/repos/openshift/origin-web-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin-web-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin-web-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin-web-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin-web-common/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin-web-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin-web-common/merges","archive_url":"https://api.github.com/repos/openshift/origin-web-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin-web-common/downloads","issues_url":"https://api.github.com/repos/openshift/origin-web-common/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin-web-common/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin-web-common/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin-web-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin-web-common/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin-web-common/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin-web-common/deployments","created_at":"2017-02-08T01:36:07Z","updated_at":"2017-05-24T20:53:57Z","pushed_at":"2017-07-24T20:34:32Z","git_url":"git://github.com/openshift/origin-web-common.git","ssh_url":"git@github.com:openshift/origin-web-common.git","clone_url":"https://github.com/openshift/origin-web-common.git","svn_url":"https://github.com/openshift/origin-web-common","homepage":null,"size":594,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":10,"forks":15,"open_issues":10,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin-web-common/pulls/129"},"html":{"href":"https://github.com/openshift/origin-web-common/pull/129"},"issue":{"href":"https://api.github.com/repos/openshift/origin-web-common/issues/129"},"comments":{"href":"https://api.github.com/repos/openshift/origin-web-common/issues/129/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin-web-common/pulls/129/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin-web-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin-web-common/pulls/129/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin-web-common/statuses/48b766ecd23dfd8747d0026e1840798e6974ae4a"}}}}
{"actor":{"display_login":"benjaminapetersen"}}