From 19def2f31e68509316b6343da79cee1f850b641e Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Thu, 20 Oct 2016 11:12:27 +0200 Subject: [PATCH] Default to 2 jobs in fixed capacity. --- batch/scheduler/host-scheduler.js | 2 +- config/environments/development.js.example | 1 + config/environments/production.js.example | 1 + config/environments/staging.js.example | 1 + config/environments/test.js.example | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/batch/scheduler/host-scheduler.js b/batch/scheduler/host-scheduler.js index f8f1f7f7..5cd238bd 100644 --- a/batch/scheduler/host-scheduler.js +++ b/batch/scheduler/host-scheduler.js @@ -50,7 +50,7 @@ HostScheduler.prototype.getCapacityProvider = function(host) { } } - var fixedCapacity = global.settings.batch_capacity_fixed_amount || 1; + var fixedCapacity = global.settings.batch_capacity_fixed_amount || 2; debug('Using strategy=fixed capacity=%d', fixedCapacity); return new FixedCapacity(fixedCapacity); }; diff --git a/config/environments/development.js.example b/config/environments/development.js.example index 21043d35..32bc65e8 100644 --- a/config/environments/development.js.example +++ b/config/environments/development.js.example @@ -41,6 +41,7 @@ module.exports.batch_capacity_strategy = 'fixed'; // Applies when strategy='fixed'. // Number of simultaneous users running queries in the same host. // It will use 1 as min. +// Default 2. module.exports.batch_capacity_fixed_amount = 2; // Applies when strategy='http-simple' or strategy='http-load'. // HTTP endpoint to check db host load. diff --git a/config/environments/production.js.example b/config/environments/production.js.example index 6ad7e3ab..527d6d63 100644 --- a/config/environments/production.js.example +++ b/config/environments/production.js.example @@ -42,6 +42,7 @@ module.exports.batch_capacity_strategy = 'fixed'; // Applies when strategy='fixed'. // Number of simultaneous users running queries in the same host. // It will use 1 as min. +// Default 2. module.exports.batch_capacity_fixed_amount = 2; // Applies when strategy='http-simple' or strategy='http-load'. // HTTP endpoint to check db host load. diff --git a/config/environments/staging.js.example b/config/environments/staging.js.example index 926480a1..82a52fc8 100644 --- a/config/environments/staging.js.example +++ b/config/environments/staging.js.example @@ -42,6 +42,7 @@ module.exports.batch_capacity_strategy = 'fixed'; // Applies when strategy='fixed'. // Number of simultaneous users running queries in the same host. // It will use 1 as min. +// Default 2. module.exports.batch_capacity_fixed_amount = 2; // Applies when strategy='http-simple' or strategy='http-load'. // HTTP endpoint to check db host load. diff --git a/config/environments/test.js.example b/config/environments/test.js.example index 19320de9..17aa5e85 100644 --- a/config/environments/test.js.example +++ b/config/environments/test.js.example @@ -39,6 +39,7 @@ module.exports.batch_capacity_strategy = 'fixed'; // Applies when strategy='fixed'. // Number of simultaneous users running queries in the same host. // It will use 1 as min. +// Default 2. module.exports.batch_capacity_fixed_amount = 2; // Applies when strategy='http-simple' or strategy='http-load'. // HTTP endpoint to check db host load.