mirror of
https://github.com/Infisical/infisical.git
synced 2025-03-29 22:02:57 +00:00
handle siginit and sigterm
This commit is contained in:
@ -225,8 +225,19 @@ const main = async () => {
|
||||
|
||||
server.on("close", async () => {
|
||||
await DatabaseService.closeDatabase();
|
||||
syncSecretsToThirdPartyServices.close();
|
||||
githubPushEventSecretScan.close();
|
||||
// TODO: prevent queue from trying to reconnect with redis after .close
|
||||
syncSecretsToThirdPartyServices.close()
|
||||
githubPushEventSecretScan.close()
|
||||
});
|
||||
|
||||
process.on("SIGINT", function () {
|
||||
server.close();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.on("SIGTERM", function () {
|
||||
server.close();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
return server;
|
||||
|
Reference in New Issue
Block a user