0af5cf703a
- HTTP strategy: mechanism to compute load from db host. - Fixed strategy: hardcoded number of queries to run at the same time, via configuration.
12 lines
233 B
JavaScript
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);
|
|
};
|