diff options
Diffstat (limited to 'src/fsyncport.erl')
-rw-r--r-- | src/fsyncport.erl | 3 |
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()}}. |