cluster-service
Advanced tools
Comparing version 2.0.0-alpha3 to 2.0.0-alpha4
@@ -37,3 +37,7 @@ var async = require("async"), | ||
async.series(tasks, function(err) { | ||
var limit = 1 + | ||
Math.floor( | ||
tasks.length * cservice.options.restartConcurrencyRatio | ||
); | ||
async.parallelLimit(tasks, limit, function(err) { | ||
evt.locals.restartOnFailure = originalAutoRestart; // restore | ||
@@ -40,0 +44,0 @@ |
@@ -41,3 +41,7 @@ var async = require("async"), | ||
async.series(tasks, function(err) { | ||
var limit = 1 + | ||
Math.floor( | ||
tasks.length * cservice.options.restartConcurrencyRatio | ||
); | ||
async.parallelLimit(tasks, limit, function(err) { | ||
evt.locals.restartOnFailure = originalAutoRestart; | ||
@@ -44,0 +48,0 @@ |
@@ -59,2 +59,3 @@ var os = require("os"); | ||
restartDelayMs: 100, | ||
restartConcurrencyRatio: 0.33, | ||
allowHttpGet: false, // useful for testing -- not safe for production use | ||
@@ -61,0 +62,0 @@ restartsPerMinute: 10, // not yet supported |
{ | ||
"name": "cluster-service", | ||
"version": "2.0.0-alpha3", | ||
"version": "2.0.0-alpha4", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Aaron Silvas", |
@@ -147,2 +147,5 @@ # cluster-service | ||
(in seconds), the process will be restarted gracefully. Only one worker will be restarted at a time. | ||
* `restartConcurrencyRatio` (default `0.33`) - The ratio of workers that can be restarted concurrently | ||
during a restart or upgrade process. This can greatly improve the speed of restarts for applications | ||
with many concurrent workers and/or slow initializing workers. | ||
* `commands` - A single directory, an array of directories, or a comma-delimited list of directories | ||
@@ -149,0 +152,0 @@ may be provided to auto-register commands found in the provided folders that match the ".js" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
159504
4121
378