removed double meta require

v1.18.x
barisusakli 11 years ago
parent 04144ed75d
commit 4ab6a5d4b2

@ -117,20 +117,18 @@ function start() {
winston.info('Base Configuration OK.'); winston.info('Base Configuration OK.');
} }
var meta = require('./src/meta');
require('./src/database').init(function(err) { require('./src/database').init(function(err) {
if (err) { if (err) {
winston.error(err.stack); winston.error(err.stack);
process.exit(); process.exit();
} }
var meta = require('./src/meta');
meta.configs.init(function () { meta.configs.init(function () {
var templates = require('templates.js'), var templates = require('templates.js'),
webserver = require('./src/webserver'), webserver = require('./src/webserver'),
sockets = require('./src/socket.io'), sockets = require('./src/socket.io'),
plugins = require('./src/plugins'), plugins = require('./src/plugins'),
upgrade = require('./src/upgrade'), upgrade = require('./src/upgrade');
meta = require('./src/meta');
templates.setGlobal('relative_path', nconf.get('relative_path')); templates.setGlobal('relative_path', nconf.get('relative_path'));
@ -196,14 +194,12 @@ function setup() {
function upgrade() { function upgrade() {
loadConfig(); loadConfig();
var meta = require('./src/meta');
require('./src/database').init(function(err) { require('./src/database').init(function(err) {
if (err) { if (err) {
winston.error(err.stack); winston.error(err.stack);
process.exit(); process.exit();
} }
meta.configs.init(function () { require('./src/meta').configs.init(function () {
require('./src/upgrade').upgrade(); require('./src/upgrade').upgrade();
}); });
}); });

Loading…
Cancel
Save