From 1e49fbc33de9128a02917fc1760ea333e57aaf8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Mon, 25 Jan 2016 15:32:00 +0100 Subject: [PATCH] Stopped batch service when draining --- batch/batch.js | 1 + 1 file changed, 1 insertion(+) diff --git a/batch/batch.js b/batch/batch.js index dba768ad..4bd00c44 100644 --- a/batch/batch.js +++ b/batch/batch.js @@ -19,6 +19,7 @@ Batch.prototype.start = function () { this._subscribe(); process.on('SIGTERM', function () { + self.stop(); self.drain(function (err) { if (err) { console.log('Exit with error');