moving db.close into the parent module

v1.18.x
psychobunny 11 years ago
parent df5f3d185a
commit bba3df6802

@ -77,6 +77,10 @@
}
};
module.close = function(callback) {
db.close(callback);
};
var helpers = {};
helpers.iterator = function(fn, keys, value, callback) {

@ -6,10 +6,6 @@ var nconf = require('nconf'),
module.exports = function(db, module) {
var helpers = module.helpers.level;
module.close = function(callback) {
db.close(callback);
};
module.searchIndex = function(key, content, id) {
// o.O
};

@ -105,6 +105,11 @@
});
};
module.close = function() {
db.close();
};
var helpers = {};
helpers.findItem = function(data, key) {
if(!data) {

@ -5,9 +5,6 @@ var winston = require('winston');
module.exports = function(db, module) {
var helpers = module.helpers.mongo;
module.close = function() {
db.close();
};
module.searchIndex = function(key, content, id) {
var data = {

@ -101,5 +101,10 @@
callback();
}
};
module.close = function() {
redisClient.quit();
};
}(exports));

@ -1,10 +1,6 @@
"use strict";
module.exports = function(redisClient, module) {
module.close = function() {
redisClient.quit();
};
module.searchIndex = function(key, content, id) {
if (key === 'post') {
module.postSearch.index(content, id);

Loading…
Cancel
Save