-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: redis weak #426
Conversation
elrrrrrrr
commented
Mar 17, 2023
- 添加 try-catch 防止 redis 请求失败导致读取失败
- 读取完成后异步设置缓存
- Adds try-catch to prevent reading failure from redis interruption.
- Asynchronously sets cache after reading is complete.
Codecov Report
@@ 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
... 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[skip ci] ## [3.9.0](v3.8.0...v3.9.0) (2023-03-20) ### Features * redis weak ([#426](#426)) ([300f0e4](300f0e4))
🎉 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 () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 eventBus 吧,别再使用 runInBackground 了