Skip to content

Conversation

@flovilmart
Copy link
Contributor

@flovilmart flovilmart commented Apr 17, 2017

We need to create 1 subscription per server for the fan-out to work correctly, this involves deleting those subscriptions when killing the server.

Also, the module now will re-create the sub when the subscription is deleted remotely too.

@flovilmart flovilmart changed the title Delete on sig Delete subscription on SIGTERM / SIGINT Apr 17, 2017
@flovilmart flovilmart requested a review from ranhsd April 17, 2017 14:07
Copy link
Collaborator

@appaquet appaquet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after small comment

lib/index.js Outdated

function deleteSubscription() {
removeListeners();
console.log('Subscriber: SIGTERM received, deleting subscription');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits, but SIGTERM is misleading here since it's also called on SIGINT. You could just say "signal received"

@flovilmart flovilmart merged commit d359b36 into master Apr 17, 2017
@flovilmart flovilmart deleted the delete-on-sig branch April 17, 2017 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants