When running the task against big amount of .haml files it creates the same amount of async processes. Say, 1000 files spawns 1000 ruby processes when used with ruby command. That easily consumes all the available machine's memory and fails.
This PR adds support of async.eachLimit function which limits the concurrent amount of async processes; and batchLimit option to configure it.
When running the task against big amount of
.haml
files it creates the same amount of async processes. Say, 1000 files spawns 1000ruby
processes when used with ruby command. That easily consumes all the available machine's memory and fails.This PR adds support of
async.eachLimit
function which limits the concurrent amount of async processes; andbatchLimit
option to configure it.