volos-quota-common
Advanced tools
Comparing version 0.11.6 to 0.11.7
@@ -88,3 +88,2 @@ /**************************************************************************** | ||
this.buckets[options.identifier] = bucket; | ||
bucket.flushBucket(); | ||
} | ||
@@ -179,3 +178,3 @@ bucket.apply(now, options, cb); | ||
if (this.count % this.options.bufferSize === 0) { | ||
if (!this.remoteExpires || (this.count % this.owner.options.bufferSize === 0)) { | ||
this.flushBucket(); | ||
@@ -187,2 +186,3 @@ } | ||
if (this.flushing || (!this.count && this.remoteExpires)) { return cb ? cb() : null; } | ||
this.flushing = true | ||
@@ -197,3 +197,2 @@ debug('flushing bucket: ', this.options.identifier); | ||
var self = this; | ||
self.flushing = true; | ||
self.owner.spi.apply(options, function(err, reply) { | ||
@@ -200,0 +199,0 @@ self.flushing = false; |
{ | ||
"name": "volos-quota-common", | ||
"version": "0.11.6", | ||
"lockfileVersion": 1 | ||
"lockfileVersion": 1, | ||
"requires": true, | ||
"dependencies": { | ||
"debug": { | ||
"version": "2.6.9", | ||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", | ||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", | ||
"requires": { | ||
"ms": "2.0.0" | ||
} | ||
}, | ||
"ms": { | ||
"version": "2.0.0", | ||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", | ||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" | ||
}, | ||
"underscore": { | ||
"version": "1.6.0", | ||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", | ||
"integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" | ||
} | ||
} | ||
} |
{ | ||
"name": "volos-quota-common", | ||
"version": "0.11.6", | ||
"version": "0.11.7", | ||
"main": "lib/quota.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
34487
8
520