diff --git a/core/out_queue_processor.js b/core/out_queue_processor.js index 360c12c..92384de 100644 --- a/core/out_queue_processor.js +++ b/core/out_queue_processor.js @@ -614,7 +614,9 @@ process.on("SIGINT", () => {}); process.on("SIGQUIT", () => {}); //Перехват мягкого останова процесса -process.on("SIGTERM", () => {}); +process.on("SIGTERM", () => { + process.exit(0); +}); //Перехват ошибок process.on("uncaughtException", e => { diff --git a/index.js b/index.js index 6116235..2a76f8d 100644 --- a/index.js +++ b/index.js @@ -36,6 +36,7 @@ process.on("exit", code => { ); }); +//Обработка событий мягкого останова процесса ["SIGINT", "SIGQUIT", "SIGTERM"].forEach(sSig => { process.once(sSig, async () => { await appSrv.logger.warn(`Получен сигнал на останов сервера приложений: ${sSig}`);