{"action":"created","comment":{"url":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/comments/68051465","id":68051465,"diff_hunk":"@@ -158,18 +169,21 @@ class CTFOServer final {\n   using Storage = CTFOStorage<SherlockStreamPersister>;\n   using MidichloriansServer = current::midichlorians::server::MidichloriansHTTPServer<CTFOServer>;\n   using RESTStorage = RESTfulStorage<Storage, CTFOHypermedia>;\n-\n-  explicit CTFOServer(const CTFOServerParams& params)\n-      : port_(params.api_port),\n-        midichlorians_server_(\n-            params.GetMidichloriansPort(), *this, params.tick_interval_ms, \"/ctfo/log\", \"OK\\n\"),\n-        debug_print_(params.debug_print_to_stderr),\n-        storage_(current::sherlock::SherlockNamespaceName(\"OldCTFOStorage\"), params.storage_file),\n-        rest_(storage_, params.GetRESTPort(), \"/ctfo/rest\", params.rest_url_prefix) {\n-    midichlorians_stream_.open(params.midichlorians_file, std::ofstream::out | std::ofstream::app);\n+  using Config = current::SelfModifyingConfig<CTFOServerParams>;\n+\n+  explicit CTFOServer(const std::string& config_path)\n+      : config_(config_path),\n+        midichlorians_server_(config_.Config().GetMidichloriansPort(),\n+                              *this,\n+                              config_.Config().tick_interval_ms,\n+                              \"/ctfo/log\",","path":"ctfo_server.h","position":65,"original_position":65,"commit_id":"f0e9d479d5bf9c304fa333388d9600cef659039e","original_commit_id":"f0e9d479d5bf9c304fa333388d9600cef659039e","user":{"login":"mzhurovich","id":11226961,"avatar_url":"https://avatars.githubusercontent.com/u/11226961?v=3","gravatar_id":"","url":"https://api.github.com/users/mzhurovich","html_url":"https://github.com/mzhurovich","followers_url":"https://api.github.com/users/mzhurovich/followers","following_url":"https://api.github.com/users/mzhurovich/following{/other_user}","gists_url":"https://api.github.com/users/mzhurovich/gists{/gist_id}","starred_url":"https://api.github.com/users/mzhurovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzhurovich/subscriptions","organizations_url":"https://api.github.com/users/mzhurovich/orgs","repos_url":"https://api.github.com/users/mzhurovich/repos","events_url":"https://api.github.com/users/mzhurovich/events{/privacy}","received_events_url":"https://api.github.com/users/mzhurovich/received_events","type":"User","site_admin":false},"body":"Move this one to config file as well?","created_at":"2016-06-22T13:24:52Z","updated_at":"2016-06-22T13:24:52Z","html_url":"https://github.com/KnowSheet/CTFO_BE/pull/62#discussion_r68051465","pull_request_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/comments/68051465"},"html":{"href":"https://github.com/KnowSheet/CTFO_BE/pull/62#discussion_r68051465"},"pull_request":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/62","id":74705602,"html_url":"https://github.com/KnowSheet/CTFO_BE/pull/62","diff_url":"https://github.com/KnowSheet/CTFO_BE/pull/62.diff","patch_url":"https://github.com/KnowSheet/CTFO_BE/pull/62.patch","issue_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/issues/62","number":62,"state":"open","locked":false,"title":"Use self modifying config in ctfo server","user":{"login":"grixa","id":379025,"avatar_url":"https://avatars.githubusercontent.com/u/379025?v=3","gravatar_id":"","url":"https://api.github.com/users/grixa","html_url":"https://github.com/grixa","followers_url":"https://api.github.com/users/grixa/followers","following_url":"https://api.github.com/users/grixa/following{/other_user}","gists_url":"https://api.github.com/users/grixa/gists{/gist_id}","starred_url":"https://api.github.com/users/grixa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grixa/subscriptions","organizations_url":"https://api.github.com/users/grixa/orgs","repos_url":"https://api.github.com/users/grixa/repos","events_url":"https://api.github.com/users/grixa/events{/privacy}","received_events_url":"https://api.github.com/users/grixa/received_events","type":"User","site_admin":false},"body":"CC @dkorolev @mzhurovich ","created_at":"2016-06-22T00:03:04Z","updated_at":"2016-06-22T13:24:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fae70182abf7f8717f141ec198d30b2bffe2108b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/62/commits","review_comments_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/62/comments","review_comment_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/issues/62/comments","statuses_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/statuses/f0e9d479d5bf9c304fa333388d9600cef659039e","head":{"label":"grixa:use-self-modifying-config-in-ctfo-server","ref":"use-self-modifying-config-in-ctfo-server","sha":"f0e9d479d5bf9c304fa333388d9600cef659039e","user":{"login":"grixa","id":379025,"avatar_url":"https://avatars.githubusercontent.com/u/379025?v=3","gravatar_id":"","url":"https://api.github.com/users/grixa","html_url":"https://github.com/grixa","followers_url":"https://api.github.com/users/grixa/followers","following_url":"https://api.github.com/users/grixa/following{/other_user}","gists_url":"https://api.github.com/users/grixa/gists{/gist_id}","starred_url":"https://api.github.com/users/grixa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grixa/subscriptions","organizations_url":"https://api.github.com/users/grixa/orgs","repos_url":"https://api.github.com/users/grixa/repos","events_url":"https://api.github.com/users/grixa/events{/privacy}","received_events_url":"https://api.github.com/users/grixa/received_events","type":"User","site_admin":false},"repo":{"id":58307436,"name":"CTFO_BE","full_name":"grixa/CTFO_BE","owner":{"login":"grixa","id":379025,"avatar_url":"https://avatars.githubusercontent.com/u/379025?v=3","gravatar_id":"","url":"https://api.github.com/users/grixa","html_url":"https://github.com/grixa","followers_url":"https://api.github.com/users/grixa/followers","following_url":"https://api.github.com/users/grixa/following{/other_user}","gists_url":"https://api.github.com/users/grixa/gists{/gist_id}","starred_url":"https://api.github.com/users/grixa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grixa/subscriptions","organizations_url":"https://api.github.com/users/grixa/orgs","repos_url":"https://api.github.com/users/grixa/repos","events_url":"https://api.github.com/users/grixa/events{/privacy}","received_events_url":"https://api.github.com/users/grixa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grixa/CTFO_BE","description":"CTFO Backend","fork":true,"url":"https://api.github.com/repos/grixa/CTFO_BE","forks_url":"https://api.github.com/repos/grixa/CTFO_BE/forks","keys_url":"https://api.github.com/repos/grixa/CTFO_BE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grixa/CTFO_BE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grixa/CTFO_BE/teams","hooks_url":"https://api.github.com/repos/grixa/CTFO_BE/hooks","issue_events_url":"https://api.github.com/repos/grixa/CTFO_BE/issues/events{/number}","events_url":"https://api.github.com/repos/grixa/CTFO_BE/events","assignees_url":"https://api.github.com/repos/grixa/CTFO_BE/assignees{/user}","branches_url":"https://api.github.com/repos/grixa/CTFO_BE/branches{/branch}","tags_url":"https://api.github.com/repos/grixa/CTFO_BE/tags","blobs_url":"https://api.github.com/repos/grixa/CTFO_BE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grixa/CTFO_BE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grixa/CTFO_BE/git/refs{/sha}","trees_url":"https://api.github.com/repos/grixa/CTFO_BE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grixa/CTFO_BE/statuses/{sha}","languages_url":"https://api.github.com/repos/grixa/CTFO_BE/languages","stargazers_url":"https://api.github.com/repos/grixa/CTFO_BE/stargazers","contributors_url":"https://api.github.com/repos/grixa/CTFO_BE/contributors","subscribers_url":"https://api.github.com/repos/grixa/CTFO_BE/subscribers","subscription_url":"https://api.github.com/repos/grixa/CTFO_BE/subscription","commits_url":"https://api.github.com/repos/grixa/CTFO_BE/commits{/sha}","git_commits_url":"https://api.github.com/repos/grixa/CTFO_BE/git/commits{/sha}","comments_url":"https://api.github.com/repos/grixa/CTFO_BE/comments{/number}","issue_comment_url":"https://api.github.com/repos/grixa/CTFO_BE/issues/comments{/number}","contents_url":"https://api.github.com/repos/grixa/CTFO_BE/contents/{+path}","compare_url":"https://api.github.com/repos/grixa/CTFO_BE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grixa/CTFO_BE/merges","archive_url":"https://api.github.com/repos/grixa/CTFO_BE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grixa/CTFO_BE/downloads","issues_url":"https://api.github.com/repos/grixa/CTFO_BE/issues{/number}","pulls_url":"https://api.github.com/repos/grixa/CTFO_BE/pulls{/number}","milestones_url":"https://api.github.com/repos/grixa/CTFO_BE/milestones{/number}","notifications_url":"https://api.github.com/repos/grixa/CTFO_BE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grixa/CTFO_BE/labels{/name}","releases_url":"https://api.github.com/repos/grixa/CTFO_BE/releases{/id}","deployments_url":"https://api.github.com/repos/grixa/CTFO_BE/deployments","created_at":"2016-05-08T10:40:25Z","updated_at":"2016-05-08T10:40:27Z","pushed_at":"2016-06-22T00:02:32Z","git_url":"git://github.com/grixa/CTFO_BE.git","ssh_url":"git@github.com:grixa/CTFO_BE.git","clone_url":"https://github.com/grixa/CTFO_BE.git","svn_url":"https://github.com/grixa/CTFO_BE","homepage":null,"size":395,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"KnowSheet:master","ref":"master","sha":"bfcaa38c7ca5a668dc882f6407a4883eae62345e","user":{"login":"KnowSheet","id":9897562,"avatar_url":"https://avatars.githubusercontent.com/u/9897562?v=3","gravatar_id":"","url":"https://api.github.com/users/KnowSheet","html_url":"https://github.com/KnowSheet","followers_url":"https://api.github.com/users/KnowSheet/followers","following_url":"https://api.github.com/users/KnowSheet/following{/other_user}","gists_url":"https://api.github.com/users/KnowSheet/gists{/gist_id}","starred_url":"https://api.github.com/users/KnowSheet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnowSheet/subscriptions","organizations_url":"https://api.github.com/users/KnowSheet/orgs","repos_url":"https://api.github.com/users/KnowSheet/repos","events_url":"https://api.github.com/users/KnowSheet/events{/privacy}","received_events_url":"https://api.github.com/users/KnowSheet/received_events","type":"Organization","site_admin":false},"repo":{"id":34405022,"name":"CTFO_BE","full_name":"KnowSheet/CTFO_BE","owner":{"login":"KnowSheet","id":9897562,"avatar_url":"https://avatars.githubusercontent.com/u/9897562?v=3","gravatar_id":"","url":"https://api.github.com/users/KnowSheet","html_url":"https://github.com/KnowSheet","followers_url":"https://api.github.com/users/KnowSheet/followers","following_url":"https://api.github.com/users/KnowSheet/following{/other_user}","gists_url":"https://api.github.com/users/KnowSheet/gists{/gist_id}","starred_url":"https://api.github.com/users/KnowSheet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnowSheet/subscriptions","organizations_url":"https://api.github.com/users/KnowSheet/orgs","repos_url":"https://api.github.com/users/KnowSheet/repos","events_url":"https://api.github.com/users/KnowSheet/events{/privacy}","received_events_url":"https://api.github.com/users/KnowSheet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KnowSheet/CTFO_BE","description":"CTFO Backend","fork":false,"url":"https://api.github.com/repos/KnowSheet/CTFO_BE","forks_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/forks","keys_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/teams","hooks_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/hooks","issue_events_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/issues/events{/number}","events_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/events","assignees_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/assignees{/user}","branches_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/branches{/branch}","tags_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/tags","blobs_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/git/refs{/sha}","trees_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/statuses/{sha}","languages_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/languages","stargazers_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/stargazers","contributors_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/contributors","subscribers_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/subscribers","subscription_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/subscription","commits_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/commits{/sha}","git_commits_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/git/commits{/sha}","comments_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/comments{/number}","issue_comment_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/issues/comments{/number}","contents_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/contents/{+path}","compare_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/merges","archive_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/downloads","issues_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/issues{/number}","pulls_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls{/number}","milestones_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/milestones{/number}","notifications_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/labels{/name}","releases_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/releases{/id}","deployments_url":"https://api.github.com/repos/KnowSheet/CTFO_BE/deployments","created_at":"2015-04-22T17:25:40Z","updated_at":"2016-03-08T17:45:44Z","pushed_at":"2016-06-22T00:03:04Z","git_url":"git://github.com/KnowSheet/CTFO_BE.git","ssh_url":"git@github.com:KnowSheet/CTFO_BE.git","clone_url":"https://github.com/KnowSheet/CTFO_BE.git","svn_url":"https://github.com/KnowSheet/CTFO_BE","homepage":null,"size":492,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/62"},"html":{"href":"https://github.com/KnowSheet/CTFO_BE/pull/62"},"issue":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/issues/62"},"comments":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/KnowSheet/CTFO_BE/statuses/f0e9d479d5bf9c304fa333388d9600cef659039e"}}}}
{"actor":{"display_login":"mzhurovich"}}