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: implement cork/uncork for eventbus #60

Merged
merged 1 commit into from
Nov 28, 2022
Merged

Conversation

killagu
Copy link
Contributor

@killagu killagu commented Nov 27, 2022

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

@lgtm-com
Copy link

lgtm-com bot commented Nov 27, 2022

This pull request introduces 1 alert when merging 63464d5 into d5e18b9 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@killagu killagu force-pushed the feat/event_cork branch 3 times, most recently from fb0ef4e to 734bb85 Compare November 27, 2022 06:46
@codecov
Copy link

codecov bot commented Nov 27, 2022

Codecov Report

Base: 92.16% // Head: 92.19% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (1bbd063) compared to base (d5e18b9).
Patch coverage: 91.07% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
+ Coverage   92.16%   92.19%   +0.03%     
==========================================
  Files         215      216       +1     
  Lines        4303     4346      +43     
  Branches      414      421       +7     
==========================================
+ Hits         3966     4007      +41     
- Misses        336      338       +2     
  Partials        1        1              
Impacted Files Coverage Δ
core/eventbus-runtime/src/SingletonEventBus.ts 84.88% <88.37%> (+5.63%) ⬆️
core/eventbus-decorator/src/EventBus.ts 100.00% <100.00%> (ø)
plugin/eventbus/lib/EggContextEventBus.ts 100.00% <100.00%> (ø)
plugin/schedule/lib/ScheduleSubscriberRegister.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@killagu killagu merged commit 38114bd into master Nov 28, 2022
@killagu killagu deleted the feat/event_cork branch November 28, 2022 01:35
@killagu
Copy link
Contributor Author

killagu commented Nov 28, 2022

  • @eggjs/eventbus-decorator@1.5.0
  • @eggjs/tegg-eventbus-runtime@1.6.0
  • @eggjs/tegg@1.6.0
  • @eggjs/tegg-aop-plugin@1.5.0
  • @eggjs/tegg-controller-plugin@1.7.0
  • @eggjs/tegg-eventbus-plugin@1.5.0
  • @eggjs/tegg-orm-plugin@2.4.0
  • @eggjs/tegg-schedule-plugin@2.4.0
  • @eggjs/tegg-plugin@1.5.0
  • @eggjs/tegg-standalone@1.5.0

elrrrrrrr added a commit to cnpm/cnpmcore that referenced this pull request Nov 28, 2022
> syncPackage 同步时,由于任务并发,可能会导致同步过程中 versions 表记录已经创建,pkg.manifests 还没有同步
> 针对这种场景做补偿逻辑,防止 tag 打在一个 pkg.manifests 没有的版本里

* 修改 pkg.manifests 补偿逻辑,兼容有 versions 没 pkg.manifests 的情况
* 添加 eventCork 的 advice,在 syncPackage 任务结束后,再统一触发 changes,依赖
[ref](eggjs/tegg#60)

在同步和被同步的场景,确保 changes 发出时,pkg.manifests 已经更新
统一 ctx 内不同 changes 时序可能影响,不影响重新读取 manifests 一致性
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.

2 participants