rate-limiter-flexible
Advanced tools
Comparing version 0.13.0 to 0.13.1
const RateLimiterRedis = require('./lib/RateLimiterRedis'); | ||
const RateLimiterMongo = require('./lib/RateLimiterMongo'); | ||
const RateLimiterMySQL = require('./lib/RateLimiterMySQL'); | ||
const { RateLimiterClusterMaster, RateLimiterCluster } = require('./lib/RateLimiterCluster'); | ||
@@ -9,2 +10,3 @@ const RateLimiterMemory = require('./lib/RateLimiterMemory'); | ||
RateLimiterMongo, | ||
RateLimiterMySQL, | ||
RateLimiterMemory, | ||
@@ -11,0 +13,0 @@ RateLimiterClusterMaster, |
@@ -34,3 +34,3 @@ const RateLimiterStoreAbstract = require('./RateLimiterStoreAbstract'); | ||
this._clearExpiredTimeoutId = setTimeout(() => { | ||
const expire = new Date(Date.now() + 3600000); | ||
const expire = new Date(Date.now() - 3600000); | ||
this.client.query(`DELETE FROM ${this.tableName} WHERE expire < ?`, [expire], () => { | ||
@@ -37,0 +37,0 @@ this._clearExpiredHourAgo(); |
{ | ||
"name": "rate-limiter-flexible", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Flexible API rate limiter backed by Redis for distributed node.js applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -29,3 +29,3 @@ [![Build Status](https://travis-ci.org/animir/node-rate-limiter-flexible.png)](https://travis-ci.org/animir/node-rate-limiter-flexible) | ||
* no prod dependencies | ||
* Redis and Mongo errors don't result to broken app if `insuranceLimiter` set up | ||
* MySQL, Redis and Mongo errors don't result to broken app if `insuranceLimiter` set up | ||
* useful `block`, `penalty` and `reward` methods | ||
@@ -32,0 +32,0 @@ |
Sorry, the diff of this file is not supported yet
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
131024
1202