Skip to content

Commit

Permalink
stop broker on kill
Browse files Browse the repository at this point in the history
  • Loading branch information
dkuida committed Nov 4, 2018
1 parent 6ebf538 commit 9d0d747
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.12.0
FROM node:10.12.0-alpine

ENV NODE_ENV=production

Expand Down
4 changes: 2 additions & 2 deletions services/users.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ module.exports = {
overallCalls++;
if (DIE_AFTER_CALLS > 0 && overallCalls >= DIE_AFTER_CALLS) {
this.logger.error(`killing service ${this.fullName} worker ${process.pid} after ${overallCalls} calls`);
await ctx.broker.destroyService(this);
// await ctx.broker.stop();
// await ctx.broker.destroyService(this);
await ctx.broker.stop();
process.exit(-1);
}
}
Expand Down

0 comments on commit 9d0d747

Please sign in to comment.