worker-farm-cli

Launch a farm of worker from the CLI.

Usage no npm install needed!

<script type="module">
  import workerFarmCli from 'https://cdn.skypack.dev/worker-farm-cli';
</script>

README

worker-farm-cli

Last version Build Status Coverage Status Dependency status Dev Dependencies Status NPM Status Donate

Launch a farm of worker from the CLI. Based on worker-farm.

Install

$ npm install worker-farm-cli --global

Usage

Usage
  $ worker-farm [options] <file>

Options
  -n, --cores   [default=numCPUs] Cores to use for spawn workers.

  -w, --workers [default=1] Workers to spawn per each core.

  -d, --delay   [default=1000ms] Waiting time between spawning workers.

  -r, --retries [default=Infinity] Max number of call requeues after unexpected worker termination.

It's possible to load [options] from file, creating '.farm' JSON file on the path of <file>.

Examples
  $ farm process
  $ farm -w 1 -n 1 process
  $ farm -w 1 -n 1 process foo=bar

License

MIT © Kiko Beats