mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #8560, fix old upgrade script
db.connect no longer exists at the root
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
var async = require('async');
|
var async = require('async');
|
||||||
|
|
||||||
|
const nconf = require('nconf');
|
||||||
var db = require('../../database');
|
var db = require('../../database');
|
||||||
var batch = require('../../batch');
|
var batch = require('../../batch');
|
||||||
|
|
||||||
@@ -22,10 +23,14 @@ module.exports = {
|
|||||||
async.waterfall([
|
async.waterfall([
|
||||||
function (next) {
|
function (next) {
|
||||||
if (isRedisSessionStore) {
|
if (isRedisSessionStore) {
|
||||||
var rdb = require('../../database/redis');
|
var connection = require('../../database/redis/connection');
|
||||||
var client = rdb.connect();
|
var client;
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function (next) {
|
function (next) {
|
||||||
|
connection.connect(nconf.get('redis'), next);
|
||||||
|
},
|
||||||
|
function (_client, next) {
|
||||||
|
client = _client;
|
||||||
client.keys('sess:*', next);
|
client.keys('sess:*', next);
|
||||||
},
|
},
|
||||||
function (sessionKeys, next) {
|
function (sessionKeys, next) {
|
||||||
|
|||||||
Reference in New Issue
Block a user