This commit is contained in:
Louis Lam
2024-10-11 18:06:59 +08:00
parent 776f4f2d5f
commit 4632030a5e
4 changed files with 78 additions and 30 deletions

View File

@@ -1599,18 +1599,20 @@ let needSetup = false;
await server.start();
server.httpServer.listen(port, hostname, () => {
server.httpServer.listen(port, hostname, async () => {
if (hostname) {
log.info("server", `Listening on ${hostname}:${port}`);
} else {
log.info("server", `Listening on ${port}`);
}
startMonitors();
await startMonitors();
// Put this here. Start background jobs after the db and server is ready to prevent clear up during db migration.
await initBackgroundJobs();
checkVersion.startInterval();
});
await initBackgroundJobs();
// Start cloudflared at the end if configured
await cloudflaredAutoStart(cloudflaredToken);