updated npm modules
This commit is contained in:
+4
-1
@@ -1,4 +1,4 @@
|
||||
# Worker Farm [](http://travis-ci.org/rvagg/node-worker-farm)
|
||||
# Worker Farm [](http://travis-ci.org/rvagg/node-worker-farm)
|
||||
|
||||
[](https://nodei.co/npm/worker-farm/) [](https://nodei.co/npm/worker-farm/)
|
||||
|
||||
@@ -111,6 +111,7 @@ If you don't provide an `options` object then the following defaults will be use
|
||||
, maxCallTime : Infinity
|
||||
, maxRetries : Infinity
|
||||
, autoStart : false
|
||||
, onChild : function() {}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -130,6 +131,8 @@ If you don't provide an `options` object then the following defaults will be use
|
||||
|
||||
* **<code>autoStart</code>** when set to `true` will start the workers as early as possible. Use this when your workers have to do expensive initialization. That way they'll be ready when the first request comes through.
|
||||
|
||||
* **<code>onChild</code>** when new child process starts this callback will be called with subprocess object as an argument. Use this when you need to add some custom communication with child processes.
|
||||
|
||||
### workerFarm.end(farm)
|
||||
|
||||
Child processes stay alive waiting for jobs indefinitely and your farm manager will stay alive managing its workers, so if you need it to stop then you have to do so explicitly. If you send your farm API to `workerFarm.end()` then it'll cleanly end your worker processes. Note though that it's a *soft* ending so it'll wait for child processes to finish what they are working on before asking them to die.
|
||||
|
||||
Reference in New Issue
Block a user