Skip to content
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

feat: support background task on ctx #119

Merged
merged 3 commits into from
Oct 29, 2016
Merged

feat: support background task on ctx #119

merged 3 commits into from
Oct 29, 2016

Conversation

fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Oct 13, 2016

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
ctx.runAtBackground(function* (ctx) {
  // async actions here
});

@fengmk2 fengmk2 added the core label Oct 13, 2016
@fengmk2 fengmk2 added this to the v1.x milestone Oct 13, 2016
@mention-bot
Copy link

@fengmk2, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dead-horse and @popomore to be potential reviewers.

@fengmk2 fengmk2 force-pushed the ctx-background-task branch from 6a8ecbe to 6c0c63a Compare October 13, 2016 18:45
@codecov-io
Copy link

codecov-io commented Oct 13, 2016

Current coverage is 95.78% (diff: 100%)

No coverage report found for master at c2b8dfa.

Powered by Codecov. Last update c2b8dfa...ba78878

@atian25
Copy link
Member

atian25 commented Oct 13, 2016

这个的使用场景? 用户请求后先返回 response,然后后台跑任务?

@fengmk2
Copy link
Member Author

fengmk2 commented Oct 14, 2016

等内部合并了再合这个。

@fengmk2 fengmk2 force-pushed the ctx-background-task branch from 6c0c63a to ba78878 Compare October 14, 2016 05:49
@atian25
Copy link
Member

atian25 commented Oct 24, 2016

@fengmk2 这个可以更新了吧?

@fengmk2
Copy link
Member Author

fengmk2 commented Oct 25, 2016

@popomore#128 合并了再继续,这样 windows 就可以测试了。

@fengmk2 fengmk2 force-pushed the ctx-background-task branch 2 times, most recently from f36d788 to 7831899 Compare October 28, 2016 12:46
fengmk2 and others added 2 commits October 29, 2016 10:13
```js
ctx.runAtBackground(function* (ctx) {
  // async actions here
});
```
@atian25 atian25 force-pushed the ctx-background-task branch from 7831899 to 5cc3ab4 Compare October 29, 2016 02:24
@atian25
Copy link
Member

atian25 commented Oct 29, 2016

travis 过了, 但 circleci 的这个报错很诡异 https://circleci.com/gh/eggjs/egg/120
ssh 上去后, 执行指令是 OK 的, 难道是 postinstall 执行过早了?
cc @dead-horse
image

@atian25
Copy link
Member

atian25 commented Oct 29, 2016

appveyor 还是挂了 https://ci.appveyor.com/project/eggjs/egg/build/1.0.222/job/fjecxu5vt4xtava2

先合了吧

@atian25 atian25 merged commit 56d1deb into master Oct 29, 2016
@atian25 atian25 deleted the ctx-background-task branch October 29, 2016 03:28
@fengmk2
Copy link
Member Author

fengmk2 commented Oct 29, 2016

难道是 postinstall 执行过早了?

按 npm 官方文档不应该的 install, postinstall: Run AFTER the package is installed. ,我将 circle ci 的 node 升级到7看看。

@fengmk2
Copy link
Member Author

fengmk2 commented Oct 29, 2016

@atian25
Copy link
Member

atian25 commented Oct 29, 2016

改了哪里?

@fengmk2
Copy link
Member Author

fengmk2 commented Oct 31, 2016

nvm i 7 && npm install

elrrrrrrr pushed a commit to elrrrrrrr/egg that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants