CartoDB-SQL-API/batch/scheduler/capacity/fixed.js
Raul Ochoa 0af5cf703a Allow to configure capacity strategy
- HTTP strategy: mechanism to compute load from db host.
- Fixed strategy: hardcoded number of queries to run at the same time, via configuration.
2016-10-19 18:42:53 +02:00

12 lines
233 B
JavaScript

'use strict';
function FixedCapacity(capacity) {
this.capacity = Math.max(1, capacity);
}
module.exports = FixedCapacity;
FixedCapacity.prototype.getCapacity = function(callback) {
return callback(null, this.capacity);
};