Skip to content

Conversation

@lyonlai
Copy link

@lyonlai lyonlai commented Sep 2, 2017

targeting: #21

});

//listening when new worker spins up too.
cluster.on('fork', function(worker) {
Copy link
Owner

Choose a reason for hiding this comment

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

As per CI client claims, now we have bound the message event twice. I'd remove forEach loop and keep your code. What do you think?

Copy link
Author

Choose a reason for hiding this comment

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

Oh. Right. Yeah it might happen depend on how you start the cluster. Sure go ahead. Thanks for pointing out. And also I think the example in the readme need to change a bit. Listen needs to happen before the fork. The current example won't find the existing workers

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah it might happen depend on how you start the cluster [...] And also I think the example in the readme need to change a bit. Listen needs to happen before the fork.

Good catch. Now I'm worried because this is a breaking change. If we go ahead we are forced to release a major version, for time being I prefer to be backwards compatible.

What do you think?

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