Skip to content

Commit

Permalink
Added SIGTERM listener
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairov committed Oct 11, 2016
1 parent 34e32b1 commit f115a81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/triggers/pull.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ function processAction(msg, cfg) {
}

// Registering shutdown handler
process.on('SIGINT', () => {
function shutdownHandler() {
console.log('Received SIGINT. Fuck off, admiral, I will not quit!');
var n = 0;
setInterval(() => console.log('I am still alive %s', n++), 100);
});
}
process.on('SIGINT', shutdownHandler);
process.on('SIGTERM', shutdownHandler);

function checkSubscriptionExists() {
console.log('Checking if subscription with name %s exists', subscriptionName);
Expand Down

0 comments on commit f115a81

Please sign in to comment.