mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix a regression with #131
This commit is contained in:
parent
6c21d84ddc
commit
d6421eb636
1 changed files with 7 additions and 2 deletions
|
@ -1,13 +1,15 @@
|
||||||
|
|
||||||
export default async function () {
|
export default async function () {
|
||||||
|
const db = require('./api/models/index')
|
||||||
|
await db.initialize()
|
||||||
|
async function start (nuxt) {
|
||||||
|
|
||||||
const log = require('../server/log')
|
const log = require('../server/log')
|
||||||
const config = require('../server/config')
|
const config = require('../server/config')
|
||||||
const settingsController = require('./api/controller/settings')
|
const settingsController = require('./api/controller/settings')
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
const timezone = require('dayjs/plugin/timezone')
|
const timezone = require('dayjs/plugin/timezone')
|
||||||
const db = require('./api/models/index')
|
|
||||||
dayjs.extend(timezone)
|
dayjs.extend(timezone)
|
||||||
await db.initialize()
|
|
||||||
await settingsController.load()
|
await settingsController.load()
|
||||||
dayjs.tz.setDefault(settingsController.settings.instance_timezone)
|
dayjs.tz.setDefault(settingsController.settings.instance_timezone)
|
||||||
|
|
||||||
|
@ -26,8 +28,11 @@ export default async function () {
|
||||||
await sequelize.close()
|
await sequelize.close()
|
||||||
process.off('SIGTERM', shutdown)
|
process.off('SIGTERM', shutdown)
|
||||||
process.off('SIGINT', shutdown)
|
process.off('SIGINT', shutdown)
|
||||||
|
nuxt.close()
|
||||||
process.exit()
|
process.exit()
|
||||||
}
|
}
|
||||||
process.on('SIGTERM', shutdown)
|
process.on('SIGTERM', shutdown)
|
||||||
process.on('SIGINT', shutdown)
|
process.on('SIGINT', shutdown)
|
||||||
|
}
|
||||||
|
this.nuxt.hook('listen', start)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue