From 2d558df15e82c0c6742c828c23ce52d0aebe40d8 Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 13 Nov 2021 12:34:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dschedule=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/schedule.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/back/schedule.ts b/back/schedule.ts index 585fd242..2be45603 100644 --- a/back/schedule.ts +++ b/back/schedule.ts @@ -44,8 +44,11 @@ const run = async () => { }; app - .listen(config.cronPort, () => { - run(); + .listen(config.cronPort, async () => { + await require('./loaders/sentry').default({ expressApp: app }); + await require('./loaders/db').default(); + + await run(); Logger.info(` ################################################ 🛡️ Schedule listening on port: ${config.cronPort} 🛡️