Skip to content

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

Merged
merged 1 commit into from
Jan 20, 2017
Merged

feat: get clusterPort #12

merged 1 commit into from
Jan 20, 2017

Conversation

popomore
Copy link
Member

@popomore popomore commented Jan 18, 2017

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Closes eggjs/egg#219

@popomore popomore requested a review from gxcsoccer January 18, 2017 09:48
@@ -77,7 +78,16 @@ class Master extends EventEmitter {

this.onExit();

this.forkAgentWorker();
getFreePort((err, port) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

把这个方法放 util 里吧

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

@codecov-io
Copy link

codecov-io commented Jan 18, 2017

Current coverage is 95.50% (diff: 100%)

Merging #12 into master will increase coverage by 0.13%

@@             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          

Powered by Codecov. Last update 26468b7...a196d2b

@popomore
Copy link
Member Author

@fengmk2 @gxcsoccer 这个看看

@@ -77,7 +78,17 @@ class Master extends EventEmitter {

this.onExit();

this.forkAgentWorker();
detectPort((err, port) => {
Copy link
Member

Choose a reason for hiding this comment

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

这个加进去后, egg-bin 那边还需要检测么?

Copy link
Member Author

Choose a reason for hiding this comment

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

egg-bin 是另外一个功能?这个是 cluster-client 的端口

Copy link
Member

Choose a reason for hiding this comment

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

喔喔

@fengmk2 fengmk2 merged commit 6f09e0f into master Jan 20, 2017
@fengmk2 fengmk2 deleted the cluster-port branch January 20, 2017 05:17
@popomore
Copy link
Member Author

发个 minor

@popomore
Copy link
Member Author

popomore added a commit to eggjs/egg that referenced this pull request Jan 20, 2017
popomore added a commit to eggjs/egg that referenced this pull request Jan 20, 2017
fengmk2 pushed a commit to eggjs/egg that referenced this pull request Jan 20, 2017
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.

freePort 移到 egg-cluster
4 participants