nickva commented on code in PR #4266:
URL: https://github.com/apache/couchdb/pull/4266#discussion_r1026727473


##########
src/smoosh/src/smoosh_utils.erl:
##########
@@ -135,3 +93,196 @@ parse_time(String, Default) ->
 
 log_level(Key, Default) when is_list(Key), is_list(Default) ->
     list_to_existing_atom(config:get("smoosh", Key, Default)).
+
+db_channels() ->
+    ConfStr = config:get("smoosh", "db_channels"),
+    channel_list(ConfStr, ?BUILT_IN_DB_CHANNELS).
+
+view_channels() ->
+    Conf = config:get("smoosh", "view_channels"),
+    channel_list(Conf, ?BUILT_IN_VIEW_CHANNELS).
+
+cleanup_channels() ->
+    Conf = config:get("smoosh", "cleanup_channels"),
+    channel_list(Conf, ?BUILT_IN_CLEANUP_CHANNELS).
+
+channel_list(ConfStr, Default) ->
+    DefaultList = split(Default),
+    ConfList = split(ConfStr),
+    lists:usort(DefaultList ++ ConfList).
+
+concurrency(ChannelName) ->
+    list_to_integer(?MODULE:get(ChannelName, "concurrency", "1")).
+
+capacity(ChannelName) ->
+    list_to_integer(?MODULE:get(ChannelName, "capacity", "9999")).

Review Comment:
   Good idea! I'll add them as defines at the top.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to