{"action":"created","comment":{"url":"https://api.github.com/repos/nci/gsky/pulls/comments/192029099","pull_request_review_id":124719111,"id":192029099,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjAyOTA5OQ==","diff_hunk":"@@ -260,19 +291,28 @@ func (config *Config) LoadConfigFile(configFile string) error {\n \treturn nil\n }\n \n-func (config *Config) Watch(infoLog, errLog *log.Logger) {\n+func WatchConfig(infoLog, errLog *log.Logger, configMap *map[string]*Config) {\n \t// Catch SIGHUP to automatically reload cache\n \tsighup := make(chan os.Signal, 1)\n \tsignal.Notify(sighup, syscall.SIGHUP)\n \tgo func() {\n \t\tselect {\n \t\tcase <-sighup:\n \t\t\tinfoLog.Println(\"Caught SIGHUP, reloading config...\")\n-\t\t\terr := config.LoadConfigFile(EtcDir + \"/config.json\")\n+\t\t\tconfMap, err := LoadAllConfigFiles(EtcDir)\n \t\t\tif err != nil {\n-\t\t\t\terrLog.Printf(\"%v\\n\", err)\n-\t\t\t\tpanic(err)\n+\t\t\t\terrLog.Printf(\"Error in loading config files: %v\\n\", err)\n+\t\t\t\treturn\n+\t\t\t}\n+\n+\t\t\tfor k := range *configMap {\n+\t\t\t\tdelete(*configMap, k)\n+\t\t\t}\n+\n+\t\t\tfor k := range confMap {\n+\t\t\t\t(*configMap)[k] = confMap[k]\n \t\t\t}\n \t\t}\n \t}()\n }\n+","path":"utils/config.go","position":77,"original_position":77,"commit_id":"b6d852351ada58ac345e10564658098a1e2f38c5","original_commit_id":"b6d852351ada58ac345e10564658098a1e2f38c5","user":{"login":"bje-","id":4327840,"node_id":"MDQ6VXNlcjQzMjc4NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/4327840?v=4","gravatar_id":"","url":"https://api.github.com/users/bje-","html_url":"https://github.com/bje-","followers_url":"https://api.github.com/users/bje-/followers","following_url":"https://api.github.com/users/bje-/following{/other_user}","gists_url":"https://api.github.com/users/bje-/gists{/gist_id}","starred_url":"https://api.github.com/users/bje-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bje-/subscriptions","organizations_url":"https://api.github.com/users/bje-/orgs","repos_url":"https://api.github.com/users/bje-/repos","events_url":"https://api.github.com/users/bje-/events{/privacy}","received_events_url":"https://api.github.com/users/bje-/received_events","type":"User","site_admin":false},"body":"Stray blank line.","created_at":"2018-05-31T08:49:01Z","updated_at":"2018-05-31T09:01:42Z","html_url":"https://github.com/nci/gsky/pull/35#discussion_r192029099","pull_request_url":"https://api.github.com/repos/nci/gsky/pulls/35","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/nci/gsky/pulls/comments/192029099"},"html":{"href":"https://github.com/nci/gsky/pull/35#discussion_r192029099"},"pull_request":{"href":"https://api.github.com/repos/nci/gsky/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/nci/gsky/pulls/35","id":191660999,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNjYwOTk5","html_url":"https://github.com/nci/gsky/pull/35","diff_url":"https://github.com/nci/gsky/pull/35.diff","patch_url":"https://github.com/nci/gsky/pull/35.patch","issue_url":"https://api.github.com/repos/nci/gsky/issues/35","number":35,"state":"open","locked":false,"title":" added support for multiple config files","user":{"login":"edisonguo","id":4906167,"node_id":"MDQ6VXNlcjQ5MDYxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/4906167?v=4","gravatar_id":"","url":"https://api.github.com/users/edisonguo","html_url":"https://github.com/edisonguo","followers_url":"https://api.github.com/users/edisonguo/followers","following_url":"https://api.github.com/users/edisonguo/following{/other_user}","gists_url":"https://api.github.com/users/edisonguo/gists{/gist_id}","starred_url":"https://api.github.com/users/edisonguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edisonguo/subscriptions","organizations_url":"https://api.github.com/users/edisonguo/orgs","repos_url":"https://api.github.com/users/edisonguo/repos","events_url":"https://api.github.com/users/edisonguo/events{/privacy}","received_events_url":"https://api.github.com/users/edisonguo/received_events","type":"User","site_admin":false},"body":"@bje- I added code to support multiple config files as we brainstormed during the Gsky sprint meeting. Essentially we can access different virtual datasets like this http://gsky-domain-url/ows/geoglam?service .... or http://gsky-domain-url/ows/ga/dea?service .... \r\nThe directory structure of the config files will be like this:\r\n<config_root_dir>/geoglam/config.json\r\n<config_root_dir>/ga/dea/config.json\r\nEach config files can have different layers for different datasets. Please review and merge the changes.","created_at":"2018-05-31T07:01:28Z","updated_at":"2018-05-31T09:01:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f3451a4962d4f5cfc344d2c42ffd72611da226d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nci/gsky/pulls/35/commits","review_comments_url":"https://api.github.com/repos/nci/gsky/pulls/35/comments","review_comment_url":"https://api.github.com/repos/nci/gsky/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nci/gsky/issues/35/comments","statuses_url":"https://api.github.com/repos/nci/gsky/statuses/b6d852351ada58ac345e10564658098a1e2f38c5","head":{"label":"edisonguo:v0.6","ref":"v0.6","sha":"b6d852351ada58ac345e10564658098a1e2f38c5","user":{"login":"edisonguo","id":4906167,"node_id":"MDQ6VXNlcjQ5MDYxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/4906167?v=4","gravatar_id":"","url":"https://api.github.com/users/edisonguo","html_url":"https://github.com/edisonguo","followers_url":"https://api.github.com/users/edisonguo/followers","following_url":"https://api.github.com/users/edisonguo/following{/other_user}","gists_url":"https://api.github.com/users/edisonguo/gists{/gist_id}","starred_url":"https://api.github.com/users/edisonguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edisonguo/subscriptions","organizations_url":"https://api.github.com/users/edisonguo/orgs","repos_url":"https://api.github.com/users/edisonguo/repos","events_url":"https://api.github.com/users/edisonguo/events{/privacy}","received_events_url":"https://api.github.com/users/edisonguo/received_events","type":"User","site_admin":false},"repo":{"id":135374521,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzNzQ1MjE=","name":"gsky-1","full_name":"edisonguo/gsky-1","owner":{"login":"edisonguo","id":4906167,"node_id":"MDQ6VXNlcjQ5MDYxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/4906167?v=4","gravatar_id":"","url":"https://api.github.com/users/edisonguo","html_url":"https://github.com/edisonguo","followers_url":"https://api.github.com/users/edisonguo/followers","following_url":"https://api.github.com/users/edisonguo/following{/other_user}","gists_url":"https://api.github.com/users/edisonguo/gists{/gist_id}","starred_url":"https://api.github.com/users/edisonguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edisonguo/subscriptions","organizations_url":"https://api.github.com/users/edisonguo/orgs","repos_url":"https://api.github.com/users/edisonguo/repos","events_url":"https://api.github.com/users/edisonguo/events{/privacy}","received_events_url":"https://api.github.com/users/edisonguo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edisonguo/gsky-1","description":"Distributed Scalable Geospatial Data Server","fork":true,"url":"https://api.github.com/repos/edisonguo/gsky-1","forks_url":"https://api.github.com/repos/edisonguo/gsky-1/forks","keys_url":"https://api.github.com/repos/edisonguo/gsky-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edisonguo/gsky-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edisonguo/gsky-1/teams","hooks_url":"https://api.github.com/repos/edisonguo/gsky-1/hooks","issue_events_url":"https://api.github.com/repos/edisonguo/gsky-1/issues/events{/number}","events_url":"https://api.github.com/repos/edisonguo/gsky-1/events","assignees_url":"https://api.github.com/repos/edisonguo/gsky-1/assignees{/user}","branches_url":"https://api.github.com/repos/edisonguo/gsky-1/branches{/branch}","tags_url":"https://api.github.com/repos/edisonguo/gsky-1/tags","blobs_url":"https://api.github.com/repos/edisonguo/gsky-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edisonguo/gsky-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edisonguo/gsky-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/edisonguo/gsky-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edisonguo/gsky-1/statuses/{sha}","languages_url":"https://api.github.com/repos/edisonguo/gsky-1/languages","stargazers_url":"https://api.github.com/repos/edisonguo/gsky-1/stargazers","contributors_url":"https://api.github.com/repos/edisonguo/gsky-1/contributors","subscribers_url":"https://api.github.com/repos/edisonguo/gsky-1/subscribers","subscription_url":"https://api.github.com/repos/edisonguo/gsky-1/subscription","commits_url":"https://api.github.com/repos/edisonguo/gsky-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/edisonguo/gsky-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/edisonguo/gsky-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/edisonguo/gsky-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/edisonguo/gsky-1/contents/{+path}","compare_url":"https://api.github.com/repos/edisonguo/gsky-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edisonguo/gsky-1/merges","archive_url":"https://api.github.com/repos/edisonguo/gsky-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edisonguo/gsky-1/downloads","issues_url":"https://api.github.com/repos/edisonguo/gsky-1/issues{/number}","pulls_url":"https://api.github.com/repos/edisonguo/gsky-1/pulls{/number}","milestones_url":"https://api.github.com/repos/edisonguo/gsky-1/milestones{/number}","notifications_url":"https://api.github.com/repos/edisonguo/gsky-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edisonguo/gsky-1/labels{/name}","releases_url":"https://api.github.com/repos/edisonguo/gsky-1/releases{/id}","deployments_url":"https://api.github.com/repos/edisonguo/gsky-1/deployments","created_at":"2018-05-30T02:02:28Z","updated_at":"2018-05-30T02:02:30Z","pushed_at":"2018-05-31T06:58:37Z","git_url":"git://github.com/edisonguo/gsky-1.git","ssh_url":"git@github.com:edisonguo/gsky-1.git","clone_url":"https://github.com/edisonguo/gsky-1.git","svn_url":"https://github.com/edisonguo/gsky-1","homepage":null,"size":3285,"stargazers_count":0,"watchers_count":0,"language":"Smarty","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nci:v0.6","ref":"v0.6","sha":"4e55a269cffad36c5cdd5234823aa30dcf7fac62","user":{"login":"nci","id":18274870,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4Mjc0ODcw","avatar_url":"https://avatars3.githubusercontent.com/u/18274870?v=4","gravatar_id":"","url":"https://api.github.com/users/nci","html_url":"https://github.com/nci","followers_url":"https://api.github.com/users/nci/followers","following_url":"https://api.github.com/users/nci/following{/other_user}","gists_url":"https://api.github.com/users/nci/gists{/gist_id}","starred_url":"https://api.github.com/users/nci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nci/subscriptions","organizations_url":"https://api.github.com/users/nci/orgs","repos_url":"https://api.github.com/users/nci/repos","events_url":"https://api.github.com/users/nci/events{/privacy}","received_events_url":"https://api.github.com/users/nci/received_events","type":"Organization","site_admin":false},"repo":{"id":126781467,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY3ODE0Njc=","name":"gsky","full_name":"nci/gsky","owner":{"login":"nci","id":18274870,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4Mjc0ODcw","avatar_url":"https://avatars3.githubusercontent.com/u/18274870?v=4","gravatar_id":"","url":"https://api.github.com/users/nci","html_url":"https://github.com/nci","followers_url":"https://api.github.com/users/nci/followers","following_url":"https://api.github.com/users/nci/following{/other_user}","gists_url":"https://api.github.com/users/nci/gists{/gist_id}","starred_url":"https://api.github.com/users/nci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nci/subscriptions","organizations_url":"https://api.github.com/users/nci/orgs","repos_url":"https://api.github.com/users/nci/repos","events_url":"https://api.github.com/users/nci/events{/privacy}","received_events_url":"https://api.github.com/users/nci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nci/gsky","description":"Distributed Scalable Geospatial Data Server","fork":false,"url":"https://api.github.com/repos/nci/gsky","forks_url":"https://api.github.com/repos/nci/gsky/forks","keys_url":"https://api.github.com/repos/nci/gsky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nci/gsky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nci/gsky/teams","hooks_url":"https://api.github.com/repos/nci/gsky/hooks","issue_events_url":"https://api.github.com/repos/nci/gsky/issues/events{/number}","events_url":"https://api.github.com/repos/nci/gsky/events","assignees_url":"https://api.github.com/repos/nci/gsky/assignees{/user}","branches_url":"https://api.github.com/repos/nci/gsky/branches{/branch}","tags_url":"https://api.github.com/repos/nci/gsky/tags","blobs_url":"https://api.github.com/repos/nci/gsky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nci/gsky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nci/gsky/git/refs{/sha}","trees_url":"https://api.github.com/repos/nci/gsky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nci/gsky/statuses/{sha}","languages_url":"https://api.github.com/repos/nci/gsky/languages","stargazers_url":"https://api.github.com/repos/nci/gsky/stargazers","contributors_url":"https://api.github.com/repos/nci/gsky/contributors","subscribers_url":"https://api.github.com/repos/nci/gsky/subscribers","subscription_url":"https://api.github.com/repos/nci/gsky/subscription","commits_url":"https://api.github.com/repos/nci/gsky/commits{/sha}","git_commits_url":"https://api.github.com/repos/nci/gsky/git/commits{/sha}","comments_url":"https://api.github.com/repos/nci/gsky/comments{/number}","issue_comment_url":"https://api.github.com/repos/nci/gsky/issues/comments{/number}","contents_url":"https://api.github.com/repos/nci/gsky/contents/{+path}","compare_url":"https://api.github.com/repos/nci/gsky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nci/gsky/merges","archive_url":"https://api.github.com/repos/nci/gsky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nci/gsky/downloads","issues_url":"https://api.github.com/repos/nci/gsky/issues{/number}","pulls_url":"https://api.github.com/repos/nci/gsky/pulls{/number}","milestones_url":"https://api.github.com/repos/nci/gsky/milestones{/number}","notifications_url":"https://api.github.com/repos/nci/gsky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nci/gsky/labels{/name}","releases_url":"https://api.github.com/repos/nci/gsky/releases{/id}","deployments_url":"https://api.github.com/repos/nci/gsky/deployments","created_at":"2018-03-26T06:10:54Z","updated_at":"2018-05-30T03:59:28Z","pushed_at":"2018-05-31T07:01:29Z","git_url":"git://github.com/nci/gsky.git","ssh_url":"git@github.com:nci/gsky.git","clone_url":"https://github.com/nci/gsky.git","svn_url":"https://github.com/nci/gsky","homepage":null,"size":3275,"stargazers_count":2,"watchers_count":2,"language":"Smarty","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":15,"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":5,"open_issues":15,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nci/gsky/pulls/35"},"html":{"href":"https://github.com/nci/gsky/pull/35"},"issue":{"href":"https://api.github.com/repos/nci/gsky/issues/35"},"comments":{"href":"https://api.github.com/repos/nci/gsky/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/nci/gsky/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/nci/gsky/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nci/gsky/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/nci/gsky/statuses/b6d852351ada58ac345e10564658098a1e2f38c5"}},"author_association":"NONE"}}
{"actor":{"display_login":"bje-"}}