From 8e0b56c6b7e3d418858dfdd26ad8a54044312ba2 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Mon, 13 May 2024 11:28:23 +0300 Subject: [PATCH] change signal handler --- containers/package-lock.json | 4 ++-- containers/test/microservices_consumer/index.js | 4 ++-- containers/test/microservices_producer/index.js | 5 +++-- containers/test/my_app/index.js | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/containers/package-lock.json b/containers/package-lock.json index c34d1748..891c3a8b 100644 --- a/containers/package-lock.json +++ b/containers/package-lock.json @@ -1,12 +1,12 @@ { "name": "@winglibs/containers", - "version": "0.0.28", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@winglibs/containers", - "version": "0.0.28", + "version": "0.1.0", "license": "MIT", "peerDependencies": { "@cdktf/provider-aws": "^19.12.0", diff --git a/containers/test/microservices_consumer/index.js b/containers/test/microservices_consumer/index.js index e6392f1f..d68e2170 100755 --- a/containers/test/microservices_consumer/index.js +++ b/containers/test/microservices_consumer/index.js @@ -7,7 +7,7 @@ if (!PRODUCER_URL) { process.exit(1); } -process.on('SIGINT', () => { +process.on('SIGTERM', () => { console.info("Interrupted") process.exit(0) }); @@ -30,4 +30,4 @@ const server = http.createServer((req, res) => { }); console.log('listening on port 3000'); -server.listen(3000); \ No newline at end of file +server.listen(3000); diff --git a/containers/test/microservices_producer/index.js b/containers/test/microservices_producer/index.js index 560a1b44..c5513570 100755 --- a/containers/test/microservices_producer/index.js +++ b/containers/test/microservices_producer/index.js @@ -1,7 +1,7 @@ #!/usr/bin/env node const http = require('http'); -process.on('SIGINT', () => { +process.on('SIGTERM', () => { console.info("Interrupted") process.exit(0) }); @@ -13,4 +13,5 @@ const server = http.createServer((req, res) => { }); console.log('listening on port 4000'); -server.listen(4000); \ No newline at end of file +server.listen(4000); + diff --git a/containers/test/my_app/index.js b/containers/test/my_app/index.js index 55e56a40..788f782d 100755 --- a/containers/test/my_app/index.js +++ b/containers/test/my_app/index.js @@ -1,7 +1,7 @@ #!/usr/bin/env node const http = require('http'); -process.on('SIGINT', () => { +process.on('SIGTERM', () => { console.info("Interrupted") process.exit(0) });