You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2019/11/22 19:13:10 UTC

[couchdb] 08/15: Get the list of allowed languages from the environment

This is an automated email from the ASF dual-hosted git repository.

kocolosk pushed a commit to branch ken-in-tree
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 950f27c97d25c551dfc4d8c268a117087c69d7e9
Author: Robert Newson <rn...@apache.org>
AuthorDate: Thu Oct 17 16:49:56 2019 +0100

    Get the list of allowed languages from the environment
---
 src/ken_server.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ken_server.erl b/src/ken_server.erl
index 5d9b29e..f082751 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).