From b5c8c6a78423abc7edc84024b5188a111a787673 Mon Sep 17 00:00:00 2001 From: chenbin Date: Thu, 15 Jun 2017 18:01:13 +0800 Subject: [PATCH 1/2] docs: typo --- docs/source/zh-cn/core/cluster-and-ipc.md | 2 +- lib/application.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/zh-cn/core/cluster-and-ipc.md b/docs/source/zh-cn/core/cluster-and-ipc.md index deaa78f932..5028c9f0c2 100644 --- a/docs/source/zh-cn/core/cluster-and-ipc.md +++ b/docs/source/zh-cn/core/cluster-and-ipc.md @@ -291,7 +291,7 @@ if (cluster.isMaster) { - 在 agent 上调用该方法会发送给 agent 自己 - `agent.messenger.sendRandom(action, data)`: - app 上没有该方法(现在 Egg 的实现是等同于 sentToAgent) - - agent 上回随机发送消息给一个 app 进程(由 master 来控制发送给谁) + - agent 上随机发送消息给一个 app 进程(由 master 来控制发送给谁) - `app.messenger.sendTo(pid, action, data)`: 发送给指定进程 ```js diff --git a/lib/application.js b/lib/application.js index 36609eba59..22318e25ba 100644 --- a/lib/application.js +++ b/lib/application.js @@ -120,7 +120,7 @@ class Application extends EggApplication { } /** - * Create an anonymouse context, the context isn't request level, so the request is mocked. + * Create an anonymous context, the context isn't request level, so the request is mocked. * then you can use context level API like `ctx.service` * @member {String} Application#createAnonymousContext * @param {Request} req - if you want to mock request like querystring, you can pass an object to this function. From 43d980b2c39112f8da9baf846beb550058bc26ce Mon Sep 17 00:00:00 2001 From: chenbin Date: Thu, 15 Jun 2017 19:24:07 +0800 Subject: [PATCH 2/2] docs: fix typo in cluster-and-ipc.md --- docs/source/zh-cn/core/cluster-and-ipc.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/zh-cn/core/cluster-and-ipc.md b/docs/source/zh-cn/core/cluster-and-ipc.md index 5028c9f0c2..71e656a02e 100644 --- a/docs/source/zh-cn/core/cluster-and-ipc.md +++ b/docs/source/zh-cn/core/cluster-and-ipc.md @@ -284,14 +284,14 @@ if (cluster.isMaster) { - `app.messenger.broadcast(action, data)`:发送给所有的 agent / app 进程(包括自己) - `app.messenger.sendToApp(action, data)`: 发送给所有的 app 进程 - - 在 app 调用该方法上会发送给自己和其他的 app 进程 + - 在 app 上调用该方法会发送给自己和其他的 app 进程 - 在 agent 上调用该方法会发送给所有的 app 进程 - `app.messenger.sendToAgent(action, data)`: 发送给 agent 进程 - - 在 app 调用该方法上会发送 agent 进程 + - 在 app 上调用该方法会发送给 agent 进程 - 在 agent 上调用该方法会发送给 agent 自己 - `agent.messenger.sendRandom(action, data)`: - app 上没有该方法(现在 Egg 的实现是等同于 sentToAgent) - - agent 上随机发送消息给一个 app 进程(由 master 来控制发送给谁) + - agent 会随机发送消息给一个 app 进程(由 master 来控制发送给谁) - `app.messenger.sendTo(pid, action, data)`: 发送给指定进程 ```js