Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Use cluster to spawn child-processes. #13

Merged
merged 1 commit into from
Oct 2, 2017
Merged

Conversation

annitya
Copy link
Contributor

@annitya annitya commented Aug 24, 2017

Fixes #10.
Found other pull-request too late :-/

No options required though!

@andreasrs andreasrs self-assigned this Sep 21, 2017
@andreasrs
Copy link
Member

I tested this locally and it seems to work well. Thanks @WhiteFire

For those interested, it works because of:
https://nodejs.org/api/cluster.html#cluster_cluster_settings

inspectPort <number> | <function> Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. By default each worker gets its own port, incremented from the master's process.debugPort.

Related issue in child_process and why this was a problem here: nodejs/node#8495 (comment)

I think this is preferable to the approach of making inspect a part of settings explicitly, as suggested in #10
It "just works" without introducing extras.

Thoughts @voldern @dlmr ?

@voldern
Copy link
Contributor

voldern commented Oct 2, 2017

Cool, if this works then its 👍 from me

@dlmr dlmr merged commit ce9466d into rocjs:master Oct 2, 2017
@dlmr
Copy link
Member

dlmr commented Oct 2, 2017

Released in 1.0.0-beta.4 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants