From 5ea9315e7314c24cae2b95a45d3e9cafab5d099c Mon Sep 17 00:00:00 2001 From: Evan Tahler Date: Mon, 22 Feb 2016 08:03:28 -0800 Subject: [PATCH] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3923f673..b0f5be05 100644 --- a/README.md +++ b/README.md @@ -421,14 +421,16 @@ multiWorker.on('multiWorkerAction', function(verb, delay){ con multiWorker.start(); ``` +### MultiWorker Options + The Options available for the multiWorker are: - `connection`: The redis configuration options (same as worker) - `queues`: Array of ordred queue names (or `*`) (same as worker) - `minTaskProcessors`: The minimum number of workers to spawn under this multiWorker, even if there is no work to do. You need at least one, or no work will ever be processed or checked - `maxTaskProcessors`: The maximum number of workers to spawn under this multiWorker, even if the queues are long and there is available CPU (the event loop isn't entierly blocked) to this node process. - checkTimeout: How often to check if the event loop is blocked (in ms) (for adding or removing multiWorker children), - maxEventLoopDelay: How long the event loop has to be delayed before considering it blocked (in ms), - toDisconnectProcessors: If false, all multiWorker children will share a single redis connection. If false, each child will connect and disconnect seperatly. This will lead to more redis connections, but faster retrival of events. +- `checkTimeout`: How often to check if the event loop is blocked (in ms) (for adding or removing multiWorker children), +- `maxEventLoopDelay`: How long the event loop has to be delayed before considering it blocked (in ms), +- `toDisconnectProcessors`: If false, all multiWorker children will share a single redis connection. If false, each child will connect and disconnect seperatly. This will lead to more redis connections, but faster retrival of events. ## Presentation This package was featured heavily in [this presentation I gave](http://blog.evantahler.com/blog/background-tasks-for-node.html) about background jobs + node.js. It contains more examples!