Skip to content

Commit

Permalink
chore: upgrade cluster-client to 2.x (#2236)
Browse files Browse the repository at this point in the history
  • Loading branch information
gxcsoccer authored and popomore committed Mar 19, 2018
1 parent 9faa052 commit 1554da5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 33 deletions.
55 changes: 28 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@
"egg"
],
"dependencies": {
"@types/accepts": "^1.3.3",
"@types/koa": "^2.0.40",
"@types/koa-router": "^7.0.25",
"@types/accepts": "^1.3.5",
"@types/koa": "^2.0.44",
"@types/koa-router": "^7.0.27",
"@types/urllib": "^2.25.0",
"accepts": "^1.3.4",
"agentkeepalive": "^3.3.0",
"cluster-client": "^1.7.1",
"accepts": "^1.3.5",
"agentkeepalive": "^3.4.1",
"cluster-client": "^2.0.0",
"debug": "^3.1.0",
"delegates": "^1.0.0",
"egg-cluster": "^1.12.5",
"egg-cookies": "^2.2.1",
"egg-core": "^4.2.0",
"egg-development": "^2.0.0",
"egg-cluster": "^1.15.0",
"egg-cookies": "^2.2.2",
"egg-core": "^4.4.1",
"egg-development": "^2.2.0",
"egg-i18n": "^2.0.0",
"egg-jsonp": "^2.0.0",
"egg-logger": "^1.6.0",
"egg-logrotator": "^3.0.0",
"egg-logger": "^1.6.1",
"egg-logrotator": "^3.0.2",
"egg-multipart": "^2.0.0",
"egg-onerror": "^2.0.0",
"egg-schedule": "^3.1.0",
"egg-security": "^2.0.0",
"egg-session": "^3.0.0",
"egg-static": "^2.0.0",
"egg-view": "^2.0.0",
"egg-schedule": "^3.3.0",
"egg-security": "^2.1.0",
"egg-session": "^3.1.0",
"egg-static": "^2.1.0",
"egg-view": "^2.1.0",
"egg-watcher": "^3.0.0",
"extend2": "^1.0.0",
"graceful": "^1.0.1",
Expand All @@ -45,32 +45,33 @@
"koa-bodyparser": "^4.2.0",
"koa-is-json": "^1.0.0",
"koa-override": "^3.0.0",
"mime-types": "^2.1.17",
"mime-types": "^2.1.18",
"on-finished": "^2.3.0",
"sendmessage": "^1.1.0",
"urllib": "^2.25.1",
"urllib": "^2.26.0",
"utility": "^1.13.1",
"ylru": "^1.2.0"
},
"devDependencies": {
"address": "^1.0.3",
"autod": "^3.0.1",
"autod-egg": "^1.0.0",
"autod-egg": "^1.1.0",
"coffee": "^4.1.0",
"egg-alinode": "^1.0.3",
"egg-bin": "^4.3.5",
"egg-doctools": "^2.1.0",
"egg-mock": "^3.13.1",
"egg-bin": "^4.3.7",
"egg-doctools": "^2.3.1",
"egg-mock": "^3.15.0",
"egg-plugin-puml": "^2.4.0",
"egg-tracer": "^1.1.0",
"egg-view-nunjucks": "^2.1.4",
"eslint": "^4.11.0",
"eslint-config-egg": "^5.1.1",
"egg-view-nunjucks": "^2.1.6",
"eslint": "^4.19.0",
"eslint-config-egg": "^7.0.0",
"findlinks": "^1.1.0",
"formstream": "^1.1.0",
"glob": "^7.1.2",
"koa-static": "^3.0.0",
"mz-modules": "^2.0.0",
"mz": "^2.7.0",
"mz-modules": "^2.1.0",
"pedding": "^1.1.0",
"runscript": "^1.3.0",
"spy": "^1.0.0",
Expand Down
8 changes: 4 additions & 4 deletions test/fixtures/apps/cluster_mod_app/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ module.exports = app => {
app.post('/publish', app.controller.home.publish);
app.get('/getHosts', app.controller.home.getHosts);

app.get('/getDefaultTimeout', function*() {
this.body = yield app.apiClient.getResponseTimeout();
app.get('/getDefaultTimeout', async function(ctx) {
ctx.body = await app.apiClient.getResponseTimeout();
});
app.get('/getOverwriteTimeout', function*() {
this.body = yield app.apiClient2.getResponseTimeout();
app.get('/getOverwriteTimeout', async function(ctx) {
ctx.body = await app.apiClient2.getResponseTimeout();
});
};
2 changes: 1 addition & 1 deletion test/fixtures/apps/cluster_mod_app/lib/api_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ApiClient extends APIClientBase {
};
}

* getResponseTimeout() {
async getResponseTimeout() {
return this._client.options.responseTimeout;
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/apps/cluster_mod_app/lib/api_client_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ApiClient2 extends APIClientBase {
};
}

* getResponseTimeout() {
async getResponseTimeout() {
return this._client.options.responseTimeout;
}
}
Expand Down

0 comments on commit 1554da5

Please sign in to comment.