Skip to content
Permalink
Browse files
Allow to customize concurrency value
  • Loading branch information
kxepal committed Oct 13, 2014
1 parent 40d157f commit c552c665dc6af0ca750ce074c816c4fcb0f05962
Showing 1 changed file with 3 additions and 2 deletions.
@@ -21,7 +21,7 @@
-export([handle_config_change/5]).

-record(state, {
concurrency=10,
concurrency,
ratio,
interactive=queue:new(),
compaction=queue:new(),
@@ -55,7 +55,8 @@ init(_) ->

read_config(State) ->
Ratio = list_to_float(config:get("ioq", "ratio", "0.01")),
State#state{ratio=Ratio}.
Concurrency = list_to_integer(config:get("ioq", "concurrency", "10")),
State#state{concurrency=Concurrency, ratio=Ratio}.

handle_call(#request{}=Request, From, State) ->
{noreply, enqueue_request(Request#request{from=From}, State), 0}.

0 comments on commit c552c66

Please sign in to comment.