{"action":"created","comment":{"url":"https://api.github.com/repos/mc0/okq/pulls/comments/23499741","id":23499741,"diff_hunk":"@@ -0,0 +1,199 @@\n+package consumers\n+\n+import (\n+\t\"time\"\n+\n+\t\"github.com/mc0/okq/clients\"\n+\t\"github.com/mc0/okq/db\"\n+)\n+\n+var callCh = make(chan func(*state))\n+func init() {\n+\tgo func() {\n+\t\ts := state{\n+\t\t\tqueueM: map[string][]*clients.Client{},","path":"clients/consumers/consumers.go","position":14,"original_position":14,"commit_id":"fb25eba758af02e88b84373b8542e1bd8ec0ba8d","original_commit_id":"fb25eba758af02e88b84373b8542e1bd8ec0ba8d","user":{"login":"mc0","id":72537,"avatar_url":"https://avatars.githubusercontent.com/u/72537?v=3","gravatar_id":"","url":"https://api.github.com/users/mc0","html_url":"https://github.com/mc0","followers_url":"https://api.github.com/users/mc0/followers","following_url":"https://api.github.com/users/mc0/following{/other_user}","gists_url":"https://api.github.com/users/mc0/gists{/gist_id}","starred_url":"https://api.github.com/users/mc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mc0/subscriptions","organizations_url":"https://api.github.com/users/mc0/orgs","repos_url":"https://api.github.com/users/mc0/repos","events_url":"https://api.github.com/users/mc0/events{/privacy}","received_events_url":"https://api.github.com/users/mc0/received_events","type":"User","site_admin":false},"body":"Should we make a type for this since we're passing it into funcs?","created_at":"2015-01-24T22:01:38Z","updated_at":"2015-01-24T22:01:38Z","html_url":"https://github.com/mc0/okq/pull/15#discussion_r23499741","pull_request_url":"https://api.github.com/repos/mc0/okq/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/mc0/okq/pulls/comments/23499741"},"html":{"href":"https://github.com/mc0/okq/pull/15#discussion_r23499741"},"pull_request":{"href":"https://api.github.com/repos/mc0/okq/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/mc0/okq/pulls/15","id":27874874,"html_url":"https://github.com/mc0/okq/pull/15","diff_url":"https://github.com/mc0/okq/pull/15.diff","patch_url":"https://github.com/mc0/okq/pull/15.patch","issue_url":"https://api.github.com/repos/mc0/okq/issues/15","number":15,"state":"open","locked":false,"title":"Perf fixes","user":{"login":"mediocregopher","id":933154,"avatar_url":"https://avatars.githubusercontent.com/u/933154?v=3","gravatar_id":"","url":"https://api.github.com/users/mediocregopher","html_url":"https://github.com/mediocregopher","followers_url":"https://api.github.com/users/mediocregopher/followers","following_url":"https://api.github.com/users/mediocregopher/following{/other_user}","gists_url":"https://api.github.com/users/mediocregopher/gists{/gist_id}","starred_url":"https://api.github.com/users/mediocregopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediocregopher/subscriptions","organizations_url":"https://api.github.com/users/mediocregopher/orgs","repos_url":"https://api.github.com/users/mediocregopher/repos","events_url":"https://api.github.com/users/mediocregopher/events{/privacy}","received_events_url":"https://api.github.com/users/mediocregopher/received_events","type":"User","site_admin":false},"body":"So this actually has some really big changes, mainly that I totally ripped out the consumer code and put it in its own package, both to make it more navigable and to make a lot of code not have to rely on the callCh, which got rid of that stopping problem we were seeing.\r\n\r\nThis also fixes the leak we found last night, as well as the problem of some queues not being read from under high load.\r\n\r\nAlso also, add number of consumers to qstatus.","created_at":"2015-01-22T20:27:44Z","updated_at":"2015-01-24T22:01:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fcd8ad6c1a9e4cc7dbd839dfde7937ab7b5b3a3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mc0/okq/pulls/15/commits","review_comments_url":"https://api.github.com/repos/mc0/okq/pulls/15/comments","review_comment_url":"https://api.github.com/repos/mc0/okq/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mc0/okq/issues/15/comments","statuses_url":"https://api.github.com/repos/mc0/okq/statuses/fb25eba758af02e88b84373b8542e1bd8ec0ba8d","head":{"label":"mediocregopher:perf-fixes","ref":"perf-fixes","sha":"fb25eba758af02e88b84373b8542e1bd8ec0ba8d","user":{"login":"mediocregopher","id":933154,"avatar_url":"https://avatars.githubusercontent.com/u/933154?v=3","gravatar_id":"","url":"https://api.github.com/users/mediocregopher","html_url":"https://github.com/mediocregopher","followers_url":"https://api.github.com/users/mediocregopher/followers","following_url":"https://api.github.com/users/mediocregopher/following{/other_user}","gists_url":"https://api.github.com/users/mediocregopher/gists{/gist_id}","starred_url":"https://api.github.com/users/mediocregopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediocregopher/subscriptions","organizations_url":"https://api.github.com/users/mediocregopher/orgs","repos_url":"https://api.github.com/users/mediocregopher/repos","events_url":"https://api.github.com/users/mediocregopher/events{/privacy}","received_events_url":"https://api.github.com/users/mediocregopher/received_events","type":"User","site_admin":false},"repo":{"id":26774648,"name":"okq","full_name":"mediocregopher/okq","owner":{"login":"mediocregopher","id":933154,"avatar_url":"https://avatars.githubusercontent.com/u/933154?v=3","gravatar_id":"","url":"https://api.github.com/users/mediocregopher","html_url":"https://github.com/mediocregopher","followers_url":"https://api.github.com/users/mediocregopher/followers","following_url":"https://api.github.com/users/mediocregopher/following{/other_user}","gists_url":"https://api.github.com/users/mediocregopher/gists{/gist_id}","starred_url":"https://api.github.com/users/mediocregopher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediocregopher/subscriptions","organizations_url":"https://api.github.com/users/mediocregopher/orgs","repos_url":"https://api.github.com/users/mediocregopher/repos","events_url":"https://api.github.com/users/mediocregopher/events{/privacy}","received_events_url":"https://api.github.com/users/mediocregopher/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mediocregopher/okq","description":"a simple event queue system built on redis and the redis serialization protocol","fork":true,"url":"https://api.github.com/repos/mediocregopher/okq","forks_url":"https://api.github.com/repos/mediocregopher/okq/forks","keys_url":"https://api.github.com/repos/mediocregopher/okq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mediocregopher/okq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mediocregopher/okq/teams","hooks_url":"https://api.github.com/repos/mediocregopher/okq/hooks","issue_events_url":"https://api.github.com/repos/mediocregopher/okq/issues/events{/number}","events_url":"https://api.github.com/repos/mediocregopher/okq/events","assignees_url":"https://api.github.com/repos/mediocregopher/okq/assignees{/user}","branches_url":"https://api.github.com/repos/mediocregopher/okq/branches{/branch}","tags_url":"https://api.github.com/repos/mediocregopher/okq/tags","blobs_url":"https://api.github.com/repos/mediocregopher/okq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mediocregopher/okq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mediocregopher/okq/git/refs{/sha}","trees_url":"https://api.github.com/repos/mediocregopher/okq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mediocregopher/okq/statuses/{sha}","languages_url":"https://api.github.com/repos/mediocregopher/okq/languages","stargazers_url":"https://api.github.com/repos/mediocregopher/okq/stargazers","contributors_url":"https://api.github.com/repos/mediocregopher/okq/contributors","subscribers_url":"https://api.github.com/repos/mediocregopher/okq/subscribers","subscription_url":"https://api.github.com/repos/mediocregopher/okq/subscription","commits_url":"https://api.github.com/repos/mediocregopher/okq/commits{/sha}","git_commits_url":"https://api.github.com/repos/mediocregopher/okq/git/commits{/sha}","comments_url":"https://api.github.com/repos/mediocregopher/okq/comments{/number}","issue_comment_url":"https://api.github.com/repos/mediocregopher/okq/issues/comments/{number}","contents_url":"https://api.github.com/repos/mediocregopher/okq/contents/{+path}","compare_url":"https://api.github.com/repos/mediocregopher/okq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mediocregopher/okq/merges","archive_url":"https://api.github.com/repos/mediocregopher/okq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mediocregopher/okq/downloads","issues_url":"https://api.github.com/repos/mediocregopher/okq/issues{/number}","pulls_url":"https://api.github.com/repos/mediocregopher/okq/pulls{/number}","milestones_url":"https://api.github.com/repos/mediocregopher/okq/milestones{/number}","notifications_url":"https://api.github.com/repos/mediocregopher/okq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mediocregopher/okq/labels{/name}","releases_url":"https://api.github.com/repos/mediocregopher/okq/releases{/id}","created_at":"2014-11-17T20:01:46Z","updated_at":"2015-01-21T03:20:19Z","pushed_at":"2015-01-23T18:31:03Z","git_url":"git://github.com/mediocregopher/okq.git","ssh_url":"git@github.com:mediocregopher/okq.git","clone_url":"https://github.com/mediocregopher/okq.git","svn_url":"https://github.com/mediocregopher/okq","homepage":"","size":218,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"mc0:master","ref":"master","sha":"74fcc49db07571591a27095dc0e7fb0ef06ac98c","user":{"login":"mc0","id":72537,"avatar_url":"https://avatars.githubusercontent.com/u/72537?v=3","gravatar_id":"","url":"https://api.github.com/users/mc0","html_url":"https://github.com/mc0","followers_url":"https://api.github.com/users/mc0/followers","following_url":"https://api.github.com/users/mc0/following{/other_user}","gists_url":"https://api.github.com/users/mc0/gists{/gist_id}","starred_url":"https://api.github.com/users/mc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mc0/subscriptions","organizations_url":"https://api.github.com/users/mc0/orgs","repos_url":"https://api.github.com/users/mc0/repos","events_url":"https://api.github.com/users/mc0/events{/privacy}","received_events_url":"https://api.github.com/users/mc0/received_events","type":"User","site_admin":false},"repo":{"id":26768163,"name":"okq","full_name":"mc0/okq","owner":{"login":"mc0","id":72537,"avatar_url":"https://avatars.githubusercontent.com/u/72537?v=3","gravatar_id":"","url":"https://api.github.com/users/mc0","html_url":"https://github.com/mc0","followers_url":"https://api.github.com/users/mc0/followers","following_url":"https://api.github.com/users/mc0/following{/other_user}","gists_url":"https://api.github.com/users/mc0/gists{/gist_id}","starred_url":"https://api.github.com/users/mc0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mc0/subscriptions","organizations_url":"https://api.github.com/users/mc0/orgs","repos_url":"https://api.github.com/users/mc0/repos","events_url":"https://api.github.com/users/mc0/events{/privacy}","received_events_url":"https://api.github.com/users/mc0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mc0/okq","description":"a simple event queue system built on redis and the redis serialization protocol","fork":false,"url":"https://api.github.com/repos/mc0/okq","forks_url":"https://api.github.com/repos/mc0/okq/forks","keys_url":"https://api.github.com/repos/mc0/okq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mc0/okq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mc0/okq/teams","hooks_url":"https://api.github.com/repos/mc0/okq/hooks","issue_events_url":"https://api.github.com/repos/mc0/okq/issues/events{/number}","events_url":"https://api.github.com/repos/mc0/okq/events","assignees_url":"https://api.github.com/repos/mc0/okq/assignees{/user}","branches_url":"https://api.github.com/repos/mc0/okq/branches{/branch}","tags_url":"https://api.github.com/repos/mc0/okq/tags","blobs_url":"https://api.github.com/repos/mc0/okq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mc0/okq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mc0/okq/git/refs{/sha}","trees_url":"https://api.github.com/repos/mc0/okq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mc0/okq/statuses/{sha}","languages_url":"https://api.github.com/repos/mc0/okq/languages","stargazers_url":"https://api.github.com/repos/mc0/okq/stargazers","contributors_url":"https://api.github.com/repos/mc0/okq/contributors","subscribers_url":"https://api.github.com/repos/mc0/okq/subscribers","subscription_url":"https://api.github.com/repos/mc0/okq/subscription","commits_url":"https://api.github.com/repos/mc0/okq/commits{/sha}","git_commits_url":"https://api.github.com/repos/mc0/okq/git/commits{/sha}","comments_url":"https://api.github.com/repos/mc0/okq/comments{/number}","issue_comment_url":"https://api.github.com/repos/mc0/okq/issues/comments/{number}","contents_url":"https://api.github.com/repos/mc0/okq/contents/{+path}","compare_url":"https://api.github.com/repos/mc0/okq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mc0/okq/merges","archive_url":"https://api.github.com/repos/mc0/okq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mc0/okq/downloads","issues_url":"https://api.github.com/repos/mc0/okq/issues{/number}","pulls_url":"https://api.github.com/repos/mc0/okq/pulls{/number}","milestones_url":"https://api.github.com/repos/mc0/okq/milestones{/number}","notifications_url":"https://api.github.com/repos/mc0/okq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mc0/okq/labels{/name}","releases_url":"https://api.github.com/repos/mc0/okq/releases{/id}","created_at":"2014-11-17T17:26:52Z","updated_at":"2015-01-21T03:23:10Z","pushed_at":"2015-01-21T03:23:10Z","git_url":"git://github.com/mc0/okq.git","ssh_url":"git@github.com:mc0/okq.git","clone_url":"https://github.com/mc0/okq.git","svn_url":"https://github.com/mc0/okq","homepage":"","size":435,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mc0/okq/pulls/15"},"html":{"href":"https://github.com/mc0/okq/pull/15"},"issue":{"href":"https://api.github.com/repos/mc0/okq/issues/15"},"comments":{"href":"https://api.github.com/repos/mc0/okq/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/mc0/okq/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/mc0/okq/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mc0/okq/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/mc0/okq/statuses/fb25eba758af02e88b84373b8542e1bd8ec0ba8d"}}}}