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');