mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Don'Ãt run message cleanup queries in the API process
This commit is contained in:
parent
1ff86defc3
commit
6cd07ed696
3 changed files with 17 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
import { connect } from "../data/db";
|
||||
import path from "path";
|
||||
import { setIsAPI } from "../globals";
|
||||
|
||||
require("dotenv").config({ path: path.resolve(process.cwd(), "api.env") });
|
||||
|
||||
|
@ -10,6 +11,8 @@ function errorHandler(err) {
|
|||
|
||||
process.on("unhandledRejection", errorHandler);
|
||||
|
||||
setIsAPI(true);
|
||||
|
||||
// Connect to the database before loading the rest of the code (that depend on the database connection)
|
||||
console.log("Connecting to database..."); // tslint:disable-line
|
||||
connect().then(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue