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: redis weak #426

Merged
merged 1 commit into from
Mar 20, 2023
Merged

feat: redis weak #426

merged 1 commit into from
Mar 20, 2023

Conversation

elrrrrrrr
Copy link
Member

manifest 读取场景弱依赖 redis

  • 添加 try-catch 防止 redis 请求失败导致读取失败
  • 读取完成后异步设置缓存

Redis dependency from manifest with weak scene dependence:

  • Adds try-catch to prevent reading failure from redis interruption.
  • Asynchronously sets cache after reading is complete.

@elrrrrrrr elrrrrrrr added the enhancement New feature or request label Mar 17, 2023
@elrrrrrrr elrrrrrrr requested review from fengmk2, gemwuu and killagu March 17, 2023 17:14
@codecov
Copy link

codecov bot commented Mar 18, 2023

Codecov Report

Merging #426 (8664494) into master (5877f71) will decrease coverage by 0.19%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
- Coverage   97.66%   97.48%   -0.19%     
==========================================
  Files         153      153              
  Lines       13623    13632       +9     
  Branches     1753     1750       -3     
==========================================
- Hits        13305    13289      -16     
- Misses        318      343      +25     
Impacted Files Coverage Δ
...p/port/controller/package/ShowPackageController.ts 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

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

Copy link
Member

@gemwuu gemwuu left a comment

Choose a reason for hiding this comment

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

LGTM

@gemwuu gemwuu merged commit 300f0e4 into master Mar 20, 2023
@gemwuu gemwuu deleted the redis-weak branch March 20, 2023 03:40
fengmk2 pushed a commit that referenced this pull request Mar 20, 2023
[skip ci]

## [3.9.0](v3.8.0...v3.9.0) (2023-03-20)

### Features

* redis weak ([#426](#426)) ([300f0e4](300f0e4))
@github-actions
Copy link

🎉 This PR is included in version 3.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -78,7 +85,9 @@ export class ShowPackageController extends AbstractController {
// only set cache with normal request
// sync request response with no bug version fixed
if (!isSync) {
await this.cacheService.savePackageEtagAndManifests(fullname, isFullManifests, etag, cacheBytes);
ctx.runInBackground(async () => {
Copy link
Member

Choose a reason for hiding this comment

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

改成 eventBus 吧,别再使用 runInBackground 了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants