mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 14:14:06 +00:00
link creation/deletion
This commit is contained in:
7
index.js
7
index.js
@@ -68,13 +68,14 @@ const server = app.listen(port, () => {
|
||||
});
|
||||
|
||||
const cleanupFunc = (signal) => {
|
||||
if (signal)
|
||||
logger.info(`${signal} signal received, shutting down now...`);
|
||||
|
||||
Promise.allSettled([
|
||||
db.sequelize.close(),
|
||||
util.promisify(server.close),
|
||||
]).then(() => {
|
||||
if (signal)
|
||||
logger.info(`Caught ${signal} signal`);
|
||||
logger.info("Cleaned up, exiting...");
|
||||
logger.info("Cleaned up, exiting.");
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user