GitHub PullRequestReviewCommentEvent at 2014-06-23 17:57:56
Repository: sphinx
Actor: azylman
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Clever/sphinx/pulls/comments/14089628","id":14089628,"diff_hunk":"@@ -33,3 +37,33 @@ func main() {\n \n \tsphinxd.Start()\n }\n+\n+// sighupHandler is the default HUP signal handler. It is defined separately so tests can\n+// overwrite it with their own handler.\n+func sighupHandler(d daemon.Daemon) {\n+\tconf, err := config.New(*configfile)\n+\tif err != nil {\n+\t\tlog.Println(\"RELOAD_CONFIG_FILE_FAILED: \" + err.Error())\n+\t\treturn\n+\t}\n+\terr = d.LoadConfig(conf)\n+\tif err != nil {\n+\t\tlog.Println(\"RELOAD_CONFIG_FILE_FAILED: \" + err.Error())\n+\t\treturn\n+\t}\n+\tlog.Println(\"Reloaded config file\")\n+}\n+\n+// setupSighupHandler craetes a channel to listen for HUP signals and process them.\n+func setupSighupHandler(d daemon.Daemon, handler func(daemon.Daemon)) {\n+\tsigc := make(chan os.Signal, 1)","path":"main.go","position":53,"original_position":53,"commit_id":"c941b0caed9c47c0d5eaaa836787f32f63095b3d","original_commit_id":"c941b0caed9c47c0d5eaaa836787f32f63095b3d","user":{"login":"azylman","id":790102,"avatar_url":"https://avatars.githubusercontent.com/u/790102?","gravatar_id":"8caeecd1984634c2a1887d3c70838663","url":"https://api.github.com/users/azylman","html_url":"https://github.com/azylman","followers_url":"https://api.github.com/users/azylman/followers","following_url":"https://api.github.com/users/azylman/following{/other_user}","gists_url":"https://api.github.com/users/azylman/gists{/gist_id}","starred_url":"https://api.github.com/users/azylman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azylman/subscriptions","organizations_url":"https://api.github.com/users/azylman/orgs","repos_url":"https://api.github.com/users/azylman/repos","events_url":"https://api.github.com/users/azylman/events{/privacy}","received_events_url":"https://api.github.com/users/azylman/received_events","type":"User","site_admin":false},"body":"Does this need to be a buffered channel?","created_at":"2014-06-23T17:57:56Z","updated_at":"2014-06-23T17:57:56Z","html_url":"https://github.com/Clever/sphinx/pull/27#discussion_r14089628","pull_request_url":"https://api.github.com/repos/Clever/sphinx/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/Clever/sphinx/pulls/comments/14089628"},"html":{"href":"https://github.com/Clever/sphinx/pull/27#discussion_r14089628"},"pull_request":{"href":"https://api.github.com/repos/Clever/sphinx/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/Clever/sphinx/pulls/27","id":17084647,"html_url":"https://github.com/Clever/sphinx/pull/27","diff_url":"https://github.com/Clever/sphinx/pull/27.diff","patch_url":"https://github.com/Clever/sphinx/pull/27.patch","issue_url":"https://api.github.com/repos/Clever/sphinx/issues/27","number":27,"state":"open","title":"Daemon should support reload config","user":{"login":"kvigen","id":5514539,"avatar_url":"https://avatars.githubusercontent.com/u/5514539?","gravatar_id":"6bf7a747088d755bd72b9d876addeb84","url":"https://api.github.com/users/kvigen","html_url":"https://github.com/kvigen","followers_url":"https://api.github.com/users/kvigen/followers","following_url":"https://api.github.com/users/kvigen/following{/other_user}","gists_url":"https://api.github.com/users/kvigen/gists{/gist_id}","starred_url":"https://api.github.com/users/kvigen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvigen/subscriptions","organizations_url":"https://api.github.com/users/kvigen/orgs","repos_url":"https://api.github.com/users/kvigen/repos","events_url":"https://api.github.com/users/kvigen/events{/privacy}","received_events_url":"https://api.github.com/users/kvigen/received_events","type":"User","site_admin":false},"body":"This change adds support for changing the limit configuration of a running sphinxd.\r\nIt does this by listening for the HUP signal, reloading the config file when\r\nthat happens, and changing the ratelimiter object.\r\n\r\nWe aren't worrying about pre-existing buckets that get affected when we reload,\r\nthey will expire out.\r\n\r\nI also tested this manually with Apache Bench","created_at":"2014-06-12T22:49:59Z","updated_at":"2014-06-23T17:57:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c99403d01d56898acc7a360509fae3b3970d5292","assignee":{"login":"azylman","id":790102,"avatar_url":"https://avatars.githubusercontent.com/u/790102?","gravatar_id":"8caeecd1984634c2a1887d3c70838663","url":"https://api.github.com/users/azylman","html_url":"https://github.com/azylman","followers_url":"https://api.github.com/users/azylman/followers","following_url":"https://api.github.com/users/azylman/following{/other_user}","gists_url":"https://api.github.com/users/azylman/gists{/gist_id}","starred_url":"https://api.github.com/users/azylman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azylman/subscriptions","organizations_url":"https://api.github.com/users/azylman/orgs","repos_url":"https://api.github.com/users/azylman/repos","events_url":"https://api.github.com/users/azylman/events{/privacy}","received_events_url":"https://api.github.com/users/azylman/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Clever/sphinx/pulls/27/commits","review_comments_url":"https://api.github.com/repos/Clever/sphinx/pulls/27/comments","review_comment_url":"https://api.github.com/repos/Clever/sphinx/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Clever/sphinx/issues/27/comments","statuses_url":"https://api.github.com/repos/Clever/sphinx/statuses/c941b0caed9c47c0d5eaaa836787f32f63095b3d","head":{"label":"Clever:reload-config","ref":"reload-config","sha":"c941b0caed9c47c0d5eaaa836787f32f63095b3d","user":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?","gravatar_id":"2228b051cd524ceadfd5f9b59fdaad78","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"repo":{"id":17844037,"name":"sphinx","full_name":"Clever/sphinx","owner":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?","gravatar_id":"2228b051cd524ceadfd5f9b59fdaad78","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Clever/sphinx","description":"Configurable HTTP rate limiter","fork":false,"url":"https://api.github.com/repos/Clever/sphinx","forks_url":"https://api.github.com/repos/Clever/sphinx/forks","keys_url":"https://api.github.com/repos/Clever/sphinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clever/sphinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clever/sphinx/teams","hooks_url":"https://api.github.com/repos/Clever/sphinx/hooks","issue_events_url":"https://api.github.com/repos/Clever/sphinx/issues/events{/number}","events_url":"https://api.github.com/repos/Clever/sphinx/events","assignees_url":"https://api.github.com/repos/Clever/sphinx/assignees{/user}","branches_url":"https://api.github.com/repos/Clever/sphinx/branches{/branch}","tags_url":"https://api.github.com/repos/Clever/sphinx/tags","blobs_url":"https://api.github.com/repos/Clever/sphinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clever/sphinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clever/sphinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clever/sphinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clever/sphinx/statuses/{sha}","languages_url":"https://api.github.com/repos/Clever/sphinx/languages","stargazers_url":"https://api.github.com/repos/Clever/sphinx/stargazers","contributors_url":"https://api.github.com/repos/Clever/sphinx/contributors","subscribers_url":"https://api.github.com/repos/Clever/sphinx/subscribers","subscription_url":"https://api.github.com/repos/Clever/sphinx/subscription","commits_url":"https://api.github.com/repos/Clever/sphinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clever/sphinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clever/sphinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clever/sphinx/issues/comments/{number}","contents_url":"https://api.github.com/repos/Clever/sphinx/contents/{+path}","compare_url":"https://api.github.com/repos/Clever/sphinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clever/sphinx/merges","archive_url":"https://api.github.com/repos/Clever/sphinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clever/sphinx/downloads","issues_url":"https://api.github.com/repos/Clever/sphinx/issues{/number}","pulls_url":"https://api.github.com/repos/Clever/sphinx/pulls{/number}","milestones_url":"https://api.github.com/repos/Clever/sphinx/milestones{/number}","notifications_url":"https://api.github.com/repos/Clever/sphinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clever/sphinx/labels{/name}","releases_url":"https://api.github.com/repos/Clever/sphinx/releases{/id}","created_at":"2014-03-17T21:30:23Z","updated_at":"2014-06-23T17:49:21Z","pushed_at":"2014-06-23T17:49:21Z","git_url":"git://github.com/Clever/sphinx.git","ssh_url":"git@github.com:Clever/sphinx.git","clone_url":"https://github.com/Clever/sphinx.git","svn_url":"https://github.com/Clever/sphinx","homepage":null,"size":4500,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"Clever:master","ref":"master","sha":"736aa14270d4883a7ad8be89c4ebb9fdd53b8cc9","user":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?","gravatar_id":"2228b051cd524ceadfd5f9b59fdaad78","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"repo":{"id":17844037,"name":"sphinx","full_name":"Clever/sphinx","owner":{"login":"Clever","id":1885509,"avatar_url":"https://avatars.githubusercontent.com/u/1885509?","gravatar_id":"2228b051cd524ceadfd5f9b59fdaad78","url":"https://api.github.com/users/Clever","html_url":"https://github.com/Clever","followers_url":"https://api.github.com/users/Clever/followers","following_url":"https://api.github.com/users/Clever/following{/other_user}","gists_url":"https://api.github.com/users/Clever/gists{/gist_id}","starred_url":"https://api.github.com/users/Clever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Clever/subscriptions","organizations_url":"https://api.github.com/users/Clever/orgs","repos_url":"https://api.github.com/users/Clever/repos","events_url":"https://api.github.com/users/Clever/events{/privacy}","received_events_url":"https://api.github.com/users/Clever/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Clever/sphinx","description":"Configurable HTTP rate limiter","fork":false,"url":"https://api.github.com/repos/Clever/sphinx","forks_url":"https://api.github.com/repos/Clever/sphinx/forks","keys_url":"https://api.github.com/repos/Clever/sphinx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Clever/sphinx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Clever/sphinx/teams","hooks_url":"https://api.github.com/repos/Clever/sphinx/hooks","issue_events_url":"https://api.github.com/repos/Clever/sphinx/issues/events{/number}","events_url":"https://api.github.com/repos/Clever/sphinx/events","assignees_url":"https://api.github.com/repos/Clever/sphinx/assignees{/user}","branches_url":"https://api.github.com/repos/Clever/sphinx/branches{/branch}","tags_url":"https://api.github.com/repos/Clever/sphinx/tags","blobs_url":"https://api.github.com/repos/Clever/sphinx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Clever/sphinx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Clever/sphinx/git/refs{/sha}","trees_url":"https://api.github.com/repos/Clever/sphinx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Clever/sphinx/statuses/{sha}","languages_url":"https://api.github.com/repos/Clever/sphinx/languages","stargazers_url":"https://api.github.com/repos/Clever/sphinx/stargazers","contributors_url":"https://api.github.com/repos/Clever/sphinx/contributors","subscribers_url":"https://api.github.com/repos/Clever/sphinx/subscribers","subscription_url":"https://api.github.com/repos/Clever/sphinx/subscription","commits_url":"https://api.github.com/repos/Clever/sphinx/commits{/sha}","git_commits_url":"https://api.github.com/repos/Clever/sphinx/git/commits{/sha}","comments_url":"https://api.github.com/repos/Clever/sphinx/comments{/number}","issue_comment_url":"https://api.github.com/repos/Clever/sphinx/issues/comments/{number}","contents_url":"https://api.github.com/repos/Clever/sphinx/contents/{+path}","compare_url":"https://api.github.com/repos/Clever/sphinx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Clever/sphinx/merges","archive_url":"https://api.github.com/repos/Clever/sphinx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Clever/sphinx/downloads","issues_url":"https://api.github.com/repos/Clever/sphinx/issues{/number}","pulls_url":"https://api.github.com/repos/Clever/sphinx/pulls{/number}","milestones_url":"https://api.github.com/repos/Clever/sphinx/milestones{/number}","notifications_url":"https://api.github.com/repos/Clever/sphinx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Clever/sphinx/labels{/name}","releases_url":"https://api.github.com/repos/Clever/sphinx/releases{/id}","created_at":"2014-03-17T21:30:23Z","updated_at":"2014-06-23T17:49:21Z","pushed_at":"2014-06-23T17:49:21Z","git_url":"git://github.com/Clever/sphinx.git","ssh_url":"git@github.com:Clever/sphinx.git","clone_url":"https://github.com/Clever/sphinx.git","svn_url":"https://github.com/Clever/sphinx","homepage":null,"size":4500,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Clever/sphinx/pulls/27"},"html":{"href":"https://github.com/Clever/sphinx/pull/27"},"issue":{"href":"https://api.github.com/repos/Clever/sphinx/issues/27"},"comments":{"href":"https://api.github.com/repos/Clever/sphinx/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/Clever/sphinx/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/Clever/sphinx/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Clever/sphinx/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/Clever/sphinx/statuses/c941b0caed9c47c0d5eaaa836787f32f63095b3d"}}}}