egg-cluster
Advanced tools
Comparing version 1.14.0 to 1.15.0
1.15.0 / 2018-03-05 | ||
================== | ||
**features** | ||
* [[`7f0be22`](http://github.com/eggjs/egg-cluster/commit/7f0be221808a29fd049fac4c0c53da8d48ce6e6e)] - feat: support beforeClose on other env (#59) (Haoliang Gao <<sakura9515@gmail.com>>) | ||
**others** | ||
* [[`e0deece`](http://github.com/eggjs/egg-cluster/commit/e0deece60a04bdeeb9841fbb751d49d94a5b0828)] - test: fix unstable test (#58) (Haoliang Gao <<sakura9515@gmail.com>>) | ||
1.14.0 / 2018-02-05 | ||
@@ -3,0 +12,0 @@ ================== |
@@ -41,2 +41,3 @@ 'use strict'; | ||
label: 'agent_worker', | ||
beforeExit: () => agent.close(), | ||
}); |
@@ -87,2 +87,3 @@ 'use strict'; | ||
label: 'app_worker', | ||
beforeExit: () => app.close(), | ||
}); |
@@ -192,4 +192,5 @@ 'use strict'; | ||
const agentWorker = childprocess.fork(agentWorkerFile, args, opt); | ||
agentWorker.status = 'starting'; | ||
agentWorker.id = ++this.agentWorkerIndex; | ||
this.workerManager.setAgent(agentWorker); | ||
agentWorker.id = ++this.agentWorkerIndex; | ||
this.log('[master] agent_worker#%s:%s start with clusterPort:%s', | ||
@@ -343,2 +344,4 @@ agentWorker.id, agentWorker.pid, this.options.clusterPort); | ||
onAgentStart() { | ||
this.agentWorker.status = 'started'; | ||
// Send egg-ready when agent is started after launched | ||
@@ -521,2 +524,3 @@ if (this.isAllAppWorkerStarted) { | ||
this.log('[master] close done, exiting with code:0'); | ||
// FIXME: master should wait agent/app exit | ||
process.exit(0); | ||
@@ -523,0 +527,0 @@ }, 100); |
@@ -50,3 +50,3 @@ 'use strict'; | ||
return { | ||
agent: this.agent ? 1 : 0, | ||
agent: (this.agent && this.agent.status === 'started') ? 1 : 0, | ||
worker: this.listWorkerIds().length, | ||
@@ -53,0 +53,0 @@ }; |
{ | ||
"name": "egg-cluster", | ||
"version": "1.14.0", | ||
"version": "1.15.0", | ||
"description": "cluster manager for egg", | ||
@@ -35,11 +35,11 @@ "main": "index.js", | ||
"dependencies": { | ||
"cfork": "^1.7.0", | ||
"cfork": "^1.7.1", | ||
"cluster-reload": "^1.0.2", | ||
"debug": "^3.1.0", | ||
"depd": "^1.1.2", | ||
"detect-port": "^1.2.1", | ||
"egg-logger": "^1.6.0", | ||
"detect-port": "^1.2.2", | ||
"egg-logger": "^1.6.1", | ||
"egg-utils": "^2.3.0", | ||
"get-ready": "^2.0.1", | ||
"graceful-process": "^1.0.0", | ||
"graceful-process": "^1.2.0", | ||
"is-type-of": "^1.2.0", | ||
@@ -51,14 +51,15 @@ "sendmessage": "^1.1.0", | ||
"address": "^1.0.3", | ||
"autod": "^2.10.1", | ||
"autod": "^3.0.1", | ||
"await-event": "^2.1.0", | ||
"coffee": "^4.1.0", | ||
"egg": "^1.10.0", | ||
"egg-bin": "^4.3.5", | ||
"egg": "^2.4.0", | ||
"egg-bin": "^4.3.7", | ||
"egg-ci": "^1.8.0", | ||
"egg-mock": "^3.13.1", | ||
"eslint": "^4.9.0", | ||
"eslint-config-egg": "^5.1.1", | ||
"egg-mock": "^3.14.1", | ||
"eslint": "^4.18.1", | ||
"eslint-config-egg": "^7.0.0", | ||
"mz": "^2.7.0", | ||
"mz-modules": "^2.0.0", | ||
"mz-modules": "^2.1.0", | ||
"pedding": "^1.1.0", | ||
"semver": "^5.4.1", | ||
"semver": "^5.5.0", | ||
"supertest": "^3.0.0" | ||
@@ -65,0 +66,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42508
876
15
Updatedcfork@^1.7.1
Updateddetect-port@^1.2.2
Updatedegg-logger@^1.6.1
Updatedgraceful-process@^1.2.0