-
Notifications
You must be signed in to change notification settings - Fork 56
feat: get clusterPort #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -77,7 +78,16 @@ class Master extends EventEmitter { | |||
|
|||
this.onExit(); | |||
|
|||
this.forkAgentWorker(); | |||
getFreePort((err, port) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把这个方法放 util 里吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯, 可以抽出来, 在 egg-bin 那边也用到了
https://github.com/eggjs/egg-bin/blob/master/lib/helper.js#L76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e166cbf
to
a184e2a
Compare
Current coverage is 95.50% (diff: 100%)@@ master #12 diff @@
==========================================
Files 7 7
Lines 259 267 +8
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 247 255 +8
Misses 12 12
Partials 0 0
|
a184e2a
to
a196d2b
Compare
@fengmk2 @gxcsoccer 这个看看 |
@@ -77,7 +78,17 @@ class Master extends EventEmitter { | |||
|
|||
this.onExit(); | |||
|
|||
this.forkAgentWorker(); | |||
detectPort((err, port) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个加进去后, egg-bin 那边还需要检测么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
egg-bin 是另外一个功能?这个是 cluster-client 的端口
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
喔喔
发个 minor |
Checklist
npm test
passesAffected core subsystem(s)
Description of change
Closes eggjs/egg#219