connect-session-knex
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -85,5 +85,6 @@ 'use strict'; | ||
* @param {Object} store | ||
* @param {number} interval | ||
* @api private | ||
*/ | ||
function dbCleanup(store) { | ||
function dbCleanup(store, interval) { | ||
return store.ready.then(function () { | ||
@@ -98,2 +99,4 @@ var condition = 'expired < CAST(? as ' + timestampTypeName(store.knex) + ')'; | ||
.whereRaw(condition, dateAsISO(store.knex)); | ||
}).finally(function() { | ||
setTimeout(dbCleanup, interval, store, interval).unref() | ||
}); | ||
@@ -147,4 +150,3 @@ } | ||
if (exists) { | ||
dbCleanup(self); | ||
self._clearer = setInterval(dbCleanup, options.clearInterval, self).unref(); | ||
dbCleanup(self, options.clearInterval); | ||
} | ||
@@ -151,0 +153,0 @@ return null; |
{ | ||
"name": "connect-session-knex", | ||
"description": "A knex.js session store for Express and Connect", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "engines": { |
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
No website
QualityPackage does not have a website.
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
13864
321
1