1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-25 11:43:07 +01:00

Add sentry close to sigterm handler

This commit is contained in:
Madeline 2023-01-10 18:31:36 +11:00
parent 30ec479e25
commit efa4411f18
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@ const gateway = new Gateway.Server({ server, port, production });
process.on("SIGTERM", async () => {
console.log("Shutting down due to SIGTERM");
server.close();
Sentry.close();
});
async function main() {

View File

@ -99,4 +99,8 @@ export const Sentry = {
res.end(res.sentry + "\n");
});
},
close: () => {
SentryNode.close();
},
};