summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2019-10-17 17:26:01 +0100
committerGitHub <noreply@github.com>2019-10-17 17:26:01 +0100
commit5161e546c7c1ce7dea2bece4017c5da45ee52f61 (patch)
treeaefacfa9b0f87e01a6b7f489c946f81aa5ad2981
parent2cafa8003986081bd377708effe263857d75c9ac (diff)
parent950f27c97d25c551dfc4d8c268a117087c69d7e9 (diff)
downloadcouchdb-5161e546c7c1ce7dea2bece4017c5da45ee52f61.tar.gz
Merge pull request #6 from apache/ken-query-servers
Get the list of allowed languages from the environment
-rw-r--r--src/ken_server.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ken_server.erl b/src/ken_server.erl
index 5d9b29eee..f082751c5 100644
--- a/src/ken_server.erl
+++ b/src/ken_server.erl
@@ -525,8 +525,9 @@ prune_worker_table(State) ->
State#state{pruned_last = erlang:monotonic_time()}.
allowed_languages() ->
- Config = config:get("query_servers") ++ config:get("native_query_servers"),
- [list_to_binary(Lang) || {Lang, _Cmd} <- Config].
+ Config = couch_proc_manager:get_servers_from_env("COUCHDB_QUERY_SERVER_") ++
+ couch_proc_manager:get_servers_from_env("COUCHDB_NATIVE_QUERY_SERVER_"),
+ [list_to_binary(string:to_lower(Lang)) || {Lang, _Cmd} <- Config].
config(Key, Default) ->
config:get("ken", Key, Default).