Skip to content

Commit

Permalink
refactor: startup
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Jul 25, 2020
1 parent 5713576 commit c54b6b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/start.js
Expand Up @@ -6,17 +6,18 @@ const winston = require('winston');
const start = module.exports;

start.start = async function () {
const db = require('./database');

printStartupInfo();

addProcessHandlers();

try {
const db = require('./database');
await db.init();
await db.checkCompatibility();

const meta = require('./meta');
await db.checkCompatibility();
await meta.configs.init();

if (nconf.get('runJobs')) {
await runUpgrades();
}
Expand Down

0 comments on commit c54b6b9

Please sign in to comment.