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

fix: changesStream suspend #408

Merged
merged 1 commit into from
Feb 15, 2023
Merged

fix: changesStream suspend #408

merged 1 commit into from
Feb 15, 2023

Conversation

elrrrrrrr
Copy link
Member

#367 tegg-v3 升级后,service 改为 Singleton,无法通过 ctx 上下文获取

  • 修改 app 内 Service 获取方式
  • 移除废弃的 typing.ts 声明

#367 Service has been refactored to Singleton in tegg-v3 , which can't be inited with context anymore.

  • Update Service init logic in appHook
  • Remove the deprecated typing.ts

image

@elrrrrrrr elrrrrrrr added the bug Something isn't working label Feb 15, 2023
@codecov
Copy link

codecov bot commented Feb 15, 2023

Codecov Report

Merging #408 (c9cb4c6) into master (8964d70) will decrease coverage by 0.17%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master     #408      +/-   ##
==========================================
- Coverage   97.60%   97.43%   -0.17%     
==========================================
  Files         151      150       -1     
  Lines       13268    13261       -7     
  Branches     2060     2054       -6     
==========================================
- Hits        12950    12921      -29     
- Misses        318      340      +22     
Impacted Files Coverage Δ
app.ts 90.90% <33.33%> (+8.05%) ⬆️
app/infra/NFSClientAdapter.ts 86.58% <0.00%> (-8.54%) ⬇️
config/config.default.ts 87.64% <0.00%> (-8.43%) ⬇️
app/core/service/TaskService.ts 97.77% <0.00%> (-1.67%) ⬇️

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

await ctx.module.cnpmcoreCore.changesStreamService.suspendTaskWhenExit();
});
});
const changesStreamService = await this.app.getEggObject(ChangesStreamService);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@killagu egg 生命周期里面也可以注入 singleton 对象?

@fengmk2 fengmk2 merged commit 2c821ea into master Feb 15, 2023
@fengmk2 fengmk2 deleted the fix-suspend branch February 15, 2023 05:37
fengmk2 pushed a commit that referenced this pull request Feb 15, 2023
[skip ci]

## [3.4.3](v3.4.2...v3.4.3) (2023-02-15)

### Bug Fixes

* changesStream suspend ([#408](#408)) ([2c821ea](2c821ea))
@github-actions
Copy link

🎉 This PR is included in version 3.4.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants