summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2017-03-16 16:04:35 +0100
committerLinus Nordberg <linus@nordu.net>2017-03-17 14:30:32 +0100
commit7ed006219939aa44e6216a808693d66ec1a53283 (patch)
tree5cad7b9e0875c941e3cb0e84e8be4ba81084ae27
parent80d177053b6a4a59a254342e94ebe7b3ccc1cc92 (diff)
Make number of fsync processed configurable
-rw-r--r--src/fsyncport.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fsyncport.erl b/src/fsyncport.erl
index 55d21ff..c516fa8 100644
--- a/src/fsyncport.erl
+++ b/src/fsyncport.erl
@@ -29,9 +29,10 @@ fsyncall(Paths, Timeout) ->
init(ExtPrg) ->
lager:debug("starting fsync service"),
process_flag(trap_exit, true),
+ FsyncProcesses = application:get_env(plop, fsync_parallel_tasks, 32),
Ports = lists:map(fun(_N) -> open_port({spawn_executable, ExtPrg},
[{packet, 2}]) end,
- lists:seq(1, 32)),
+ lists:seq(1, FsyncProcesses)),
lager:debug("fsync service started", []),
{ok, #state{idleports = Ports, busyports = dict:new(),
waiting = queue:new(), requests = dict:new()}}.