Log more info

This commit is contained in:
Daniel García Aubert 2019-04-04 17:26:58 +02:00
parent 5a0e3810d4
commit 12e35b02e8

24
app.js
View File

@ -125,19 +125,19 @@ process.on('SIGHUP', function() {
process.on('SIGTERM', function () {
global.logger.debug('Signal TERM Received');
listener.close(function () {
global.logger.debug('Http server closed');
listener.close();
global.logger.debug('Http server closed');
server.batch.stop();
server.batch.drain(function (err) {
if (err) {
global.logger.error(err);
return process.exit(1);
}
global.logger.info('Exit gracefully');
process.exit(0);
});
server.batch.stop();
global.logger.debug('Batch queries stopped');
server.batch.drain(function (err) {
if (err) {
global.logger.error(err);
return process.exit(1);
}
global.logger.debug('Batch queries drained');
global.logger.info('Exit gracefully');
process.exit(0);
});
});