{"action":"created","comment":{"url":"https://api.github.com/repos/Elders/Pushnotifications/pulls/comments/205455756","pull_request_review_id":140727154,"id":205455756,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTQ1NTc1Ng==","diff_hunk":"@@ -0,0 +1,77 @@\n+﻿using Cassandra;\n+using PushNotifications.Contracts;\n+using System.Collections.Generic;\n+\n+namespace Multitenancy.Tracker\n+{\n+    public partial class TopicSubscriptionTracker : ITopicSubscriptionTracker\n+    {\n+        const string CreateTableTemplate = @\"CREATE TABLE IF NOT EXISTS \"\"pushnot_subscriptions\"\" (cv counter, name varchar, PRIMARY KEY (name));\";\n+        const string IncrementTemplate = @\"UPDATE \"\"pushnot_subscriptions\"\" SET cv = cv + 1 WHERE name=?;\";\n+        const string DecrementTemplate = @\"UPDATE \"\"pushnot_subscriptions\"\" SET cv = cv - 1 WHERE name=?;\";\n+        const string GetTemplate = @\"SELECT * FROM pushnot_subscriptions WHERE name=?;\";\n+\n+        private readonly ISession _session;\n+        private readonly PreparedStatement incrementTemplate;\n+        private readonly PreparedStatement decrementTemplate;\n+        private readonly PreparedStatement getTemplate;\n+\n+        public TopicSubscriptionTracker(ISession session)\n+        {\n+            _session = session;\n+\n+            _session.Execute(CreateTableTemplate);","path":"src/Multitenancy.Tracker/TopicSubscriptionTracker.cs","position":null,"original_position":23,"commit_id":"fc6e0993a3d90334abd6153277f4faf8cc12aa4e","original_commit_id":"9ee993773ad2e87641ea16916bef6f720bdbddc9","user":{"login":"AlexPlom","id":28866652,"node_id":"MDQ6VXNlcjI4ODY2NjUy","avatar_url":"https://avatars2.githubusercontent.com/u/28866652?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexPlom","html_url":"https://github.com/AlexPlom","followers_url":"https://api.github.com/users/AlexPlom/followers","following_url":"https://api.github.com/users/AlexPlom/following{/other_user}","gists_url":"https://api.github.com/users/AlexPlom/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexPlom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexPlom/subscriptions","organizations_url":"https://api.github.com/users/AlexPlom/orgs","repos_url":"https://api.github.com/users/AlexPlom/repos","events_url":"https://api.github.com/users/AlexPlom/events{/privacy}","received_events_url":"https://api.github.com/users/AlexPlom/received_events","type":"User","site_admin":false},"body":"This should be resolved with the addition of the RedisLock when we need a dist lock, or the InMemory Lock from Cronus when we run this on a single server.","created_at":"2018-07-26T13:30:10Z","updated_at":"2018-07-26T13:30:10Z","html_url":"https://github.com/Elders/Pushnotifications/pull/15#discussion_r205455756","pull_request_url":"https://api.github.com/repos/Elders/Pushnotifications/pulls/15","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Elders/Pushnotifications/pulls/comments/205455756"},"html":{"href":"https://github.com/Elders/Pushnotifications/pull/15#discussion_r205455756"},"pull_request":{"href":"https://api.github.com/repos/Elders/Pushnotifications/pulls/15"}},"in_reply_to_id":204761667},"pull_request":{"url":"https://api.github.com/repos/Elders/Pushnotifications/pulls/15","id":203520789,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNTIwNzg5","html_url":"https://github.com/Elders/Pushnotifications/pull/15","diff_url":"https://github.com/Elders/Pushnotifications/pull/15.diff","patch_url":"https://github.com/Elders/Pushnotifications/pull/15.patch","issue_url":"https://api.github.com/repos/Elders/Pushnotifications/issues/15","number":15,"state":"open","locked":false,"title":"Release 4.1.0","user":{"login":"AlexPlom","id":28866652,"node_id":"MDQ6VXNlcjI4ODY2NjUy","avatar_url":"https://avatars2.githubusercontent.com/u/28866652?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexPlom","html_url":"https://github.com/AlexPlom","followers_url":"https://api.github.com/users/AlexPlom/followers","following_url":"https://api.github.com/users/AlexPlom/following{/other_user}","gists_url":"https://api.github.com/users/AlexPlom/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexPlom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexPlom/subscriptions","organizations_url":"https://api.github.com/users/AlexPlom/orgs","repos_url":"https://api.github.com/users/AlexPlom/repos","events_url":"https://api.github.com/users/AlexPlom/events{/privacy}","received_events_url":"https://api.github.com/users/AlexPlom/received_events","type":"User","site_admin":false},"body":"**This release includes:** \r\n\r\n- Topic subscription for Firebase and Pushy. \r\n- Sending to a topic for Firebase and Pushy.","created_at":"2018-07-24T13:08:50Z","updated_at":"2018-07-26T13:30:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"377cee8e97a2b8bb1ecae1e30ed8390959bf37fd","assignee":{"login":"mynkow","id":183151,"node_id":"MDQ6VXNlcjE4MzE1MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/183151?v=4","gravatar_id":"","url":"https://api.github.com/users/mynkow","html_url":"https://github.com/mynkow","followers_url":"https://api.github.com/users/mynkow/followers","following_url":"https://api.github.com/users/mynkow/following{/other_user}","gists_url":"https://api.github.com/users/mynkow/gists{/gist_id}","starred_url":"https://api.github.com/users/mynkow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mynkow/subscriptions","organizations_url":"https://api.github.com/users/mynkow/orgs","repos_url":"https://api.github.com/users/mynkow/repos","events_url":"https://api.github.com/users/mynkow/events{/privacy}","received_events_url":"https://api.github.com/users/mynkow/received_events","type":"User","site_admin":false},"assignees":[{"login":"mynkow","id":183151,"node_id":"MDQ6VXNlcjE4MzE1MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/183151?v=4","gravatar_id":"","url":"https://api.github.com/users/mynkow","html_url":"https://github.com/mynkow","followers_url":"https://api.github.com/users/mynkow/followers","following_url":"https://api.github.com/users/mynkow/following{/other_user}","gists_url":"https://api.github.com/users/mynkow/gists{/gist_id}","starred_url":"https://api.github.com/users/mynkow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mynkow/subscriptions","organizations_url":"https://api.github.com/users/mynkow/orgs","repos_url":"https://api.github.com/users/mynkow/repos","events_url":"https://api.github.com/users/mynkow/events{/privacy}","received_events_url":"https://api.github.com/users/mynkow/received_events","type":"User","site_admin":false},{"login":"SayliS","id":14348096,"node_id":"MDQ6VXNlcjE0MzQ4MDk2","avatar_url":"https://avatars3.githubusercontent.com/u/14348096?v=4","gravatar_id":"","url":"https://api.github.com/users/SayliS","html_url":"https://github.com/SayliS","followers_url":"https://api.github.com/users/SayliS/followers","following_url":"https://api.github.com/users/SayliS/following{/other_user}","gists_url":"https://api.github.com/users/SayliS/gists{/gist_id}","starred_url":"https://api.github.com/users/SayliS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SayliS/subscriptions","organizations_url":"https://api.github.com/users/SayliS/orgs","repos_url":"https://api.github.com/users/SayliS/repos","events_url":"https://api.github.com/users/SayliS/events{/privacy}","received_events_url":"https://api.github.com/users/SayliS/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Elders/Pushnotifications/pulls/15/commits","review_comments_url":"https://api.github.com/repos/Elders/Pushnotifications/pulls/15/comments","review_comment_url":"https://api.github.com/repos/Elders/Pushnotifications/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Elders/Pushnotifications/issues/15/comments","statuses_url":"https://api.github.com/repos/Elders/Pushnotifications/statuses/fc6e0993a3d90334abd6153277f4faf8cc12aa4e","head":{"label":"Elders:release-4.1.0","ref":"release-4.1.0","sha":"fc6e0993a3d90334abd6153277f4faf8cc12aa4e","user":{"login":"Elders","id":5380915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODA5MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5380915?v=4","gravatar_id":"","url":"https://api.github.com/users/Elders","html_url":"https://github.com/Elders","followers_url":"https://api.github.com/users/Elders/followers","following_url":"https://api.github.com/users/Elders/following{/other_user}","gists_url":"https://api.github.com/users/Elders/gists{/gist_id}","starred_url":"https://api.github.com/users/Elders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elders/subscriptions","organizations_url":"https://api.github.com/users/Elders/orgs","repos_url":"https://api.github.com/users/Elders/repos","events_url":"https://api.github.com/users/Elders/events{/privacy}","received_events_url":"https://api.github.com/users/Elders/received_events","type":"Organization","site_admin":false},"repo":{"id":38373595,"node_id":"MDEwOlJlcG9zaXRvcnkzODM3MzU5NQ==","name":"Pushnotifications","full_name":"Elders/Pushnotifications","owner":{"login":"Elders","id":5380915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODA5MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5380915?v=4","gravatar_id":"","url":"https://api.github.com/users/Elders","html_url":"https://github.com/Elders","followers_url":"https://api.github.com/users/Elders/followers","following_url":"https://api.github.com/users/Elders/following{/other_user}","gists_url":"https://api.github.com/users/Elders/gists{/gist_id}","starred_url":"https://api.github.com/users/Elders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elders/subscriptions","organizations_url":"https://api.github.com/users/Elders/orgs","repos_url":"https://api.github.com/users/Elders/repos","events_url":"https://api.github.com/users/Elders/events{/privacy}","received_events_url":"https://api.github.com/users/Elders/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Elders/Pushnotifications","description":null,"fork":false,"url":"https://api.github.com/repos/Elders/Pushnotifications","forks_url":"https://api.github.com/repos/Elders/Pushnotifications/forks","keys_url":"https://api.github.com/repos/Elders/Pushnotifications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elders/Pushnotifications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elders/Pushnotifications/teams","hooks_url":"https://api.github.com/repos/Elders/Pushnotifications/hooks","issue_events_url":"https://api.github.com/repos/Elders/Pushnotifications/issues/events{/number}","events_url":"https://api.github.com/repos/Elders/Pushnotifications/events","assignees_url":"https://api.github.com/repos/Elders/Pushnotifications/assignees{/user}","branches_url":"https://api.github.com/repos/Elders/Pushnotifications/branches{/branch}","tags_url":"https://api.github.com/repos/Elders/Pushnotifications/tags","blobs_url":"https://api.github.com/repos/Elders/Pushnotifications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elders/Pushnotifications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elders/Pushnotifications/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elders/Pushnotifications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elders/Pushnotifications/statuses/{sha}","languages_url":"https://api.github.com/repos/Elders/Pushnotifications/languages","stargazers_url":"https://api.github.com/repos/Elders/Pushnotifications/stargazers","contributors_url":"https://api.github.com/repos/Elders/Pushnotifications/contributors","subscribers_url":"https://api.github.com/repos/Elders/Pushnotifications/subscribers","subscription_url":"https://api.github.com/repos/Elders/Pushnotifications/subscription","commits_url":"https://api.github.com/repos/Elders/Pushnotifications/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elders/Pushnotifications/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elders/Pushnotifications/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elders/Pushnotifications/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elders/Pushnotifications/contents/{+path}","compare_url":"https://api.github.com/repos/Elders/Pushnotifications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elders/Pushnotifications/merges","archive_url":"https://api.github.com/repos/Elders/Pushnotifications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elders/Pushnotifications/downloads","issues_url":"https://api.github.com/repos/Elders/Pushnotifications/issues{/number}","pulls_url":"https://api.github.com/repos/Elders/Pushnotifications/pulls{/number}","milestones_url":"https://api.github.com/repos/Elders/Pushnotifications/milestones{/number}","notifications_url":"https://api.github.com/repos/Elders/Pushnotifications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elders/Pushnotifications/labels{/name}","releases_url":"https://api.github.com/repos/Elders/Pushnotifications/releases{/id}","deployments_url":"https://api.github.com/repos/Elders/Pushnotifications/deployments","created_at":"2015-07-01T13:48:30Z","updated_at":"2018-07-10T07:22:05Z","pushed_at":"2018-07-26T13:28:16Z","git_url":"git://github.com/Elders/Pushnotifications.git","ssh_url":"git@github.com:Elders/Pushnotifications.git","clone_url":"https://github.com/Elders/Pushnotifications.git","svn_url":"https://github.com/Elders/Pushnotifications","homepage":null,"size":714,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"Elders:master","ref":"master","sha":"e37cfc3fc2d1fa1fe24a0c71c6fef88b1190cf42","user":{"login":"Elders","id":5380915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODA5MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5380915?v=4","gravatar_id":"","url":"https://api.github.com/users/Elders","html_url":"https://github.com/Elders","followers_url":"https://api.github.com/users/Elders/followers","following_url":"https://api.github.com/users/Elders/following{/other_user}","gists_url":"https://api.github.com/users/Elders/gists{/gist_id}","starred_url":"https://api.github.com/users/Elders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elders/subscriptions","organizations_url":"https://api.github.com/users/Elders/orgs","repos_url":"https://api.github.com/users/Elders/repos","events_url":"https://api.github.com/users/Elders/events{/privacy}","received_events_url":"https://api.github.com/users/Elders/received_events","type":"Organization","site_admin":false},"repo":{"id":38373595,"node_id":"MDEwOlJlcG9zaXRvcnkzODM3MzU5NQ==","name":"Pushnotifications","full_name":"Elders/Pushnotifications","owner":{"login":"Elders","id":5380915,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODA5MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5380915?v=4","gravatar_id":"","url":"https://api.github.com/users/Elders","html_url":"https://github.com/Elders","followers_url":"https://api.github.com/users/Elders/followers","following_url":"https://api.github.com/users/Elders/following{/other_user}","gists_url":"https://api.github.com/users/Elders/gists{/gist_id}","starred_url":"https://api.github.com/users/Elders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Elders/subscriptions","organizations_url":"https://api.github.com/users/Elders/orgs","repos_url":"https://api.github.com/users/Elders/repos","events_url":"https://api.github.com/users/Elders/events{/privacy}","received_events_url":"https://api.github.com/users/Elders/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Elders/Pushnotifications","description":null,"fork":false,"url":"https://api.github.com/repos/Elders/Pushnotifications","forks_url":"https://api.github.com/repos/Elders/Pushnotifications/forks","keys_url":"https://api.github.com/repos/Elders/Pushnotifications/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Elders/Pushnotifications/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Elders/Pushnotifications/teams","hooks_url":"https://api.github.com/repos/Elders/Pushnotifications/hooks","issue_events_url":"https://api.github.com/repos/Elders/Pushnotifications/issues/events{/number}","events_url":"https://api.github.com/repos/Elders/Pushnotifications/events","assignees_url":"https://api.github.com/repos/Elders/Pushnotifications/assignees{/user}","branches_url":"https://api.github.com/repos/Elders/Pushnotifications/branches{/branch}","tags_url":"https://api.github.com/repos/Elders/Pushnotifications/tags","blobs_url":"https://api.github.com/repos/Elders/Pushnotifications/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Elders/Pushnotifications/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Elders/Pushnotifications/git/refs{/sha}","trees_url":"https://api.github.com/repos/Elders/Pushnotifications/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Elders/Pushnotifications/statuses/{sha}","languages_url":"https://api.github.com/repos/Elders/Pushnotifications/languages","stargazers_url":"https://api.github.com/repos/Elders/Pushnotifications/stargazers","contributors_url":"https://api.github.com/repos/Elders/Pushnotifications/contributors","subscribers_url":"https://api.github.com/repos/Elders/Pushnotifications/subscribers","subscription_url":"https://api.github.com/repos/Elders/Pushnotifications/subscription","commits_url":"https://api.github.com/repos/Elders/Pushnotifications/commits{/sha}","git_commits_url":"https://api.github.com/repos/Elders/Pushnotifications/git/commits{/sha}","comments_url":"https://api.github.com/repos/Elders/Pushnotifications/comments{/number}","issue_comment_url":"https://api.github.com/repos/Elders/Pushnotifications/issues/comments{/number}","contents_url":"https://api.github.com/repos/Elders/Pushnotifications/contents/{+path}","compare_url":"https://api.github.com/repos/Elders/Pushnotifications/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Elders/Pushnotifications/merges","archive_url":"https://api.github.com/repos/Elders/Pushnotifications/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Elders/Pushnotifications/downloads","issues_url":"https://api.github.com/repos/Elders/Pushnotifications/issues{/number}","pulls_url":"https://api.github.com/repos/Elders/Pushnotifications/pulls{/number}","milestones_url":"https://api.github.com/repos/Elders/Pushnotifications/milestones{/number}","notifications_url":"https://api.github.com/repos/Elders/Pushnotifications/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Elders/Pushnotifications/labels{/name}","releases_url":"https://api.github.com/repos/Elders/Pushnotifications/releases{/id}","deployments_url":"https://api.github.com/repos/Elders/Pushnotifications/deployments","created_at":"2015-07-01T13:48:30Z","updated_at":"2018-07-10T07:22:05Z","pushed_at":"2018-07-26T13:28:16Z","git_url":"git://github.com/Elders/Pushnotifications.git","ssh_url":"git@github.com:Elders/Pushnotifications.git","clone_url":"https://github.com/Elders/Pushnotifications.git","svn_url":"https://github.com/Elders/Pushnotifications","homepage":null,"size":714,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Elders/Pushnotifications/pulls/15"},"html":{"href":"https://github.com/Elders/Pushnotifications/pull/15"},"issue":{"href":"https://api.github.com/repos/Elders/Pushnotifications/issues/15"},"comments":{"href":"https://api.github.com/repos/Elders/Pushnotifications/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/Elders/Pushnotifications/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/Elders/Pushnotifications/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Elders/Pushnotifications/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/Elders/Pushnotifications/statuses/fc6e0993a3d90334abd6153277f4faf8cc12aa4e"}},"author_association":"NONE"}}
{"actor":{"display_login":"AlexPlom"}}