{"action":"created","comment":{"url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/comments/80352467","id":80352467,"diff_hunk":"@@ -282,6 +284,30 @@ public Task AddAsync(Datum datum, CancellationToken cancellationToken)\n                     });\n                 }\n \n+                // if the probe's RunLocalCommitOnStore option is set to true, commit it locally\n+                else if (runLocalCommitOnStore && !_sampleTriggeredCommitRunning)\n+                {\n+                    SensusServiceHelper.Get().Logger.Log(\"Running sample-triggered commit.\", LoggingLevel.Normal, GetType());\n+\n+                    _sampleTriggeredCommitRunning = true;\n+\n+                    return Task.Run(async () =>\n+                    {\n+                        try\n+                        {\n+                            await CommitChunksAsync(_data, this, cancellationToken);\n+                        }\n+                        catch (Exception ex)\n+                        {\n+                            SensusServiceHelper.Get().Logger.Log(\"Failed to run sample-triggered commit:  \" + ex.Message, LoggingLevel.Normal, GetType());\n+                        }\n+                        finally\n+                        {\n+                            _sampleTriggeredCommitRunning = false;\n+                        }\n+                    });\n+                }\n+","path":"SensusService/DataStores/DataStore.cs","position":52,"original_position":52,"commit_id":"8d048987bb875f76aa13a81229a03092687edebf","original_commit_id":"8d048987bb875f76aa13a81229a03092687edebf","user":{"login":"MatthewGerber","id":4643066,"avatar_url":"https://avatars.githubusercontent.com/u/4643066?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewGerber","html_url":"https://github.com/MatthewGerber","followers_url":"https://api.github.com/users/MatthewGerber/followers","following_url":"https://api.github.com/users/MatthewGerber/following{/other_user}","gists_url":"https://api.github.com/users/MatthewGerber/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewGerber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewGerber/subscriptions","organizations_url":"https://api.github.com/users/MatthewGerber/orgs","repos_url":"https://api.github.com/users/MatthewGerber/repos","events_url":"https://api.github.com/users/MatthewGerber/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewGerber/received_events","type":"User","site_admin":false},"body":"Too much duplication of earlier code...might put the `Task.Run` into an `Action` that gets used in both places.","created_at":"2016-09-24T04:04:41Z","updated_at":"2016-09-24T04:04:42Z","html_url":"https://github.com/predictive-technology-laboratory/sensus/pull/243#discussion_r80352467","pull_request_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/243","_links":{"self":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/comments/80352467"},"html":{"href":"https://github.com/predictive-technology-laboratory/sensus/pull/243#discussion_r80352467"},"pull_request":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/243"}}},"pull_request":{"url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/243","id":86603919,"html_url":"https://github.com/predictive-technology-laboratory/sensus/pull/243","diff_url":"https://github.com/predictive-technology-laboratory/sensus/pull/243.diff","patch_url":"https://github.com/predictive-technology-laboratory/sensus/pull/243.patch","issue_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/issues/243","number":243,"state":"open","locked":false,"title":"Concurrent With Unit Tests","user":{"login":"mrucker","id":966578,"avatar_url":"https://avatars.githubusercontent.com/u/966578?v=3","gravatar_id":"","url":"https://api.github.com/users/mrucker","html_url":"https://github.com/mrucker","followers_url":"https://api.github.com/users/mrucker/followers","following_url":"https://api.github.com/users/mrucker/following{/other_user}","gists_url":"https://api.github.com/users/mrucker/gists{/gist_id}","starred_url":"https://api.github.com/users/mrucker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrucker/subscriptions","organizations_url":"https://api.github.com/users/mrucker/orgs","repos_url":"https://api.github.com/users/mrucker/repos","events_url":"https://api.github.com/users/mrucker/events{/privacy}","received_events_url":"https://api.github.com/users/mrucker/received_events","type":"User","site_admin":false},"body":"Dr. Gerber,\r\n\r\nI noticed your UI thread synchronization code. I factored that code out into an interface I call IConcurrent.\r\n\r\nBecause race conditions can be so tricky I really wanted Unit Tests to make sure it worked as expected.\r\n\r\nAfter reading, experimenting and testing, I finally found an architecture that allows to write tests for code that doesn't require an emulator and then two classes that allow us to write tests for code that needs to run native on device. I added a bunch of new projects but every one has a purpose that I'm happy to explain.\r\n\r\nI wanted to go ahead and get the pull request in the pipe because the changes touched a whole bunch of files and I'm worried about merge conflicts if we wait too long on this one.\r\n\r\nThanks,\r\n\r\nMark ","created_at":"2016-09-24T02:21:45Z","updated_at":"2016-09-24T04:04:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae7c18f6ce232f46c20b6b4d7d484b068d3eea24","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/243/commits","review_comments_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/243/comments","review_comment_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/issues/243/comments","statuses_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/statuses/8d048987bb875f76aa13a81229a03092687edebf","head":{"label":"wesbonelli:concurrent","ref":"concurrent","sha":"8d048987bb875f76aa13a81229a03092687edebf","user":{"login":"wesbonelli","id":10502868,"avatar_url":"https://avatars.githubusercontent.com/u/10502868?v=3","gravatar_id":"","url":"https://api.github.com/users/wesbonelli","html_url":"https://github.com/wesbonelli","followers_url":"https://api.github.com/users/wesbonelli/followers","following_url":"https://api.github.com/users/wesbonelli/following{/other_user}","gists_url":"https://api.github.com/users/wesbonelli/gists{/gist_id}","starred_url":"https://api.github.com/users/wesbonelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesbonelli/subscriptions","organizations_url":"https://api.github.com/users/wesbonelli/orgs","repos_url":"https://api.github.com/users/wesbonelli/repos","events_url":"https://api.github.com/users/wesbonelli/events{/privacy}","received_events_url":"https://api.github.com/users/wesbonelli/received_events","type":"User","site_admin":false},"repo":{"id":60724144,"name":"sensus","full_name":"wesbonelli/sensus","owner":{"login":"wesbonelli","id":10502868,"avatar_url":"https://avatars.githubusercontent.com/u/10502868?v=3","gravatar_id":"","url":"https://api.github.com/users/wesbonelli","html_url":"https://github.com/wesbonelli","followers_url":"https://api.github.com/users/wesbonelli/followers","following_url":"https://api.github.com/users/wesbonelli/following{/other_user}","gists_url":"https://api.github.com/users/wesbonelli/gists{/gist_id}","starred_url":"https://api.github.com/users/wesbonelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesbonelli/subscriptions","organizations_url":"https://api.github.com/users/wesbonelli/orgs","repos_url":"https://api.github.com/users/wesbonelli/repos","events_url":"https://api.github.com/users/wesbonelli/events{/privacy}","received_events_url":"https://api.github.com/users/wesbonelli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wesbonelli/sensus","description":"A Cross-Platform System for Mobile Crowd-Sensing","fork":true,"url":"https://api.github.com/repos/wesbonelli/sensus","forks_url":"https://api.github.com/repos/wesbonelli/sensus/forks","keys_url":"https://api.github.com/repos/wesbonelli/sensus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wesbonelli/sensus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wesbonelli/sensus/teams","hooks_url":"https://api.github.com/repos/wesbonelli/sensus/hooks","issue_events_url":"https://api.github.com/repos/wesbonelli/sensus/issues/events{/number}","events_url":"https://api.github.com/repos/wesbonelli/sensus/events","assignees_url":"https://api.github.com/repos/wesbonelli/sensus/assignees{/user}","branches_url":"https://api.github.com/repos/wesbonelli/sensus/branches{/branch}","tags_url":"https://api.github.com/repos/wesbonelli/sensus/tags","blobs_url":"https://api.github.com/repos/wesbonelli/sensus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wesbonelli/sensus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wesbonelli/sensus/git/refs{/sha}","trees_url":"https://api.github.com/repos/wesbonelli/sensus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wesbonelli/sensus/statuses/{sha}","languages_url":"https://api.github.com/repos/wesbonelli/sensus/languages","stargazers_url":"https://api.github.com/repos/wesbonelli/sensus/stargazers","contributors_url":"https://api.github.com/repos/wesbonelli/sensus/contributors","subscribers_url":"https://api.github.com/repos/wesbonelli/sensus/subscribers","subscription_url":"https://api.github.com/repos/wesbonelli/sensus/subscription","commits_url":"https://api.github.com/repos/wesbonelli/sensus/commits{/sha}","git_commits_url":"https://api.github.com/repos/wesbonelli/sensus/git/commits{/sha}","comments_url":"https://api.github.com/repos/wesbonelli/sensus/comments{/number}","issue_comment_url":"https://api.github.com/repos/wesbonelli/sensus/issues/comments{/number}","contents_url":"https://api.github.com/repos/wesbonelli/sensus/contents/{+path}","compare_url":"https://api.github.com/repos/wesbonelli/sensus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wesbonelli/sensus/merges","archive_url":"https://api.github.com/repos/wesbonelli/sensus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wesbonelli/sensus/downloads","issues_url":"https://api.github.com/repos/wesbonelli/sensus/issues{/number}","pulls_url":"https://api.github.com/repos/wesbonelli/sensus/pulls{/number}","milestones_url":"https://api.github.com/repos/wesbonelli/sensus/milestones{/number}","notifications_url":"https://api.github.com/repos/wesbonelli/sensus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wesbonelli/sensus/labels{/name}","releases_url":"https://api.github.com/repos/wesbonelli/sensus/releases{/id}","deployments_url":"https://api.github.com/repos/wesbonelli/sensus/deployments","created_at":"2016-06-08T19:18:17Z","updated_at":"2016-06-08T19:18:19Z","pushed_at":"2016-09-24T02:01:37Z","git_url":"git://github.com/wesbonelli/sensus.git","ssh_url":"git@github.com:wesbonelli/sensus.git","clone_url":"https://github.com/wesbonelli/sensus.git","svn_url":"https://github.com/wesbonelli/sensus","homepage":"https://github.com/predictive-technology-laboratory/sensus/wiki","size":114523,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"predictive-technology-laboratory:develop","ref":"develop","sha":"19fb9c5d2615d9754ab7f634189fc187afd93c59","user":{"login":"predictive-technology-laboratory","id":7767826,"avatar_url":"https://avatars.githubusercontent.com/u/7767826?v=3","gravatar_id":"","url":"https://api.github.com/users/predictive-technology-laboratory","html_url":"https://github.com/predictive-technology-laboratory","followers_url":"https://api.github.com/users/predictive-technology-laboratory/followers","following_url":"https://api.github.com/users/predictive-technology-laboratory/following{/other_user}","gists_url":"https://api.github.com/users/predictive-technology-laboratory/gists{/gist_id}","starred_url":"https://api.github.com/users/predictive-technology-laboratory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/predictive-technology-laboratory/subscriptions","organizations_url":"https://api.github.com/users/predictive-technology-laboratory/orgs","repos_url":"https://api.github.com/users/predictive-technology-laboratory/repos","events_url":"https://api.github.com/users/predictive-technology-laboratory/events{/privacy}","received_events_url":"https://api.github.com/users/predictive-technology-laboratory/received_events","type":"Organization","site_admin":false},"repo":{"id":26280126,"name":"sensus","full_name":"predictive-technology-laboratory/sensus","owner":{"login":"predictive-technology-laboratory","id":7767826,"avatar_url":"https://avatars.githubusercontent.com/u/7767826?v=3","gravatar_id":"","url":"https://api.github.com/users/predictive-technology-laboratory","html_url":"https://github.com/predictive-technology-laboratory","followers_url":"https://api.github.com/users/predictive-technology-laboratory/followers","following_url":"https://api.github.com/users/predictive-technology-laboratory/following{/other_user}","gists_url":"https://api.github.com/users/predictive-technology-laboratory/gists{/gist_id}","starred_url":"https://api.github.com/users/predictive-technology-laboratory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/predictive-technology-laboratory/subscriptions","organizations_url":"https://api.github.com/users/predictive-technology-laboratory/orgs","repos_url":"https://api.github.com/users/predictive-technology-laboratory/repos","events_url":"https://api.github.com/users/predictive-technology-laboratory/events{/privacy}","received_events_url":"https://api.github.com/users/predictive-technology-laboratory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/predictive-technology-laboratory/sensus","description":"A Cross-Platform System for Mobile Crowd-Sensing","fork":false,"url":"https://api.github.com/repos/predictive-technology-laboratory/sensus","forks_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/forks","keys_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/teams","hooks_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/hooks","issue_events_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/issues/events{/number}","events_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/events","assignees_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/assignees{/user}","branches_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/branches{/branch}","tags_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/tags","blobs_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/git/refs{/sha}","trees_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/statuses/{sha}","languages_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/languages","stargazers_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/stargazers","contributors_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/contributors","subscribers_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/subscribers","subscription_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/subscription","commits_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/commits{/sha}","git_commits_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/git/commits{/sha}","comments_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/comments{/number}","issue_comment_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/issues/comments{/number}","contents_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/contents/{+path}","compare_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/merges","archive_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/downloads","issues_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/issues{/number}","pulls_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls{/number}","milestones_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/milestones{/number}","notifications_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/labels{/name}","releases_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/releases{/id}","deployments_url":"https://api.github.com/repos/predictive-technology-laboratory/sensus/deployments","created_at":"2014-11-06T16:58:33Z","updated_at":"2016-07-21T18:35:25Z","pushed_at":"2016-09-24T02:21:45Z","git_url":"git://github.com/predictive-technology-laboratory/sensus.git","ssh_url":"git@github.com:predictive-technology-laboratory/sensus.git","clone_url":"https://github.com/predictive-technology-laboratory/sensus.git","svn_url":"https://github.com/predictive-technology-laboratory/sensus","homepage":"https://github.com/predictive-technology-laboratory/sensus/wiki","size":136654,"stargazers_count":13,"watchers_count":13,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":39,"forks":20,"open_issues":39,"watchers":13,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/243"},"html":{"href":"https://github.com/predictive-technology-laboratory/sensus/pull/243"},"issue":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/issues/243"},"comments":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/issues/243/comments"},"review_comments":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/243/comments"},"review_comment":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/pulls/243/commits"},"statuses":{"href":"https://api.github.com/repos/predictive-technology-laboratory/sensus/statuses/8d048987bb875f76aa13a81229a03092687edebf"}}}}
{"actor":{"display_login":"MatthewGerber"}}