-
Notifications
You must be signed in to change notification settings - Fork 310
fix cloud sync issues #1133
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 cloud sync issues #1133
Conversation
|
沒詳細看 |
如果还要对比代码的话,需要下载一次代码文件,这里我用的读取文件摘要来进行对比 scriptcat/src/app/service/service_worker/synchronize.ts Lines 423 to 428 in 38f9715
|
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.
Pull request overview
此 PR 旨在修复云同步相关问题(关联 issue #1035, #942, #1077, #964),主要通过引入文件系统速率限制器来控制并发请求数量,优化云端状态同步逻辑,并修正存储配置。
主要变更:
- 新增 RateLimiter 和 LimiterFileSystem 类,通过控制并发操作数量(默认最大5个)来防止云端服务器速率限制和超时问题
- 重构云同步状态同步逻辑,改进云端和本地状态的比对和合并策略,确保脚本的启用状态、排序等属性正确同步
- 将同步相关数据的存储从 chrome.storage.sync 改为 chrome.storage.local,避免同步存储的大小和配额限制
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/filesystem/limiter.ts | 新增速率限制器实现,包括 RateLimiter 基础类和 LimiterFileSystem 包装类 |
| packages/filesystem/factory.ts | 集成 LimiterFileSystem,为所有文件系统实例添加速率限制功能 |
| src/app/service/service_worker/synchronize.ts | 修复存储配置,优化同步状态逻辑,改进 pullScript 方法以正确应用云端状态 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan * Apply rate limiting to open, openDir and create operations Co-authored-by: CodFrm <22783163+CodFrm@users.noreply.github.com> * Merge fix/cloud-sync and apply rate limiting to open() method Co-authored-by: CodFrm <22783163+CodFrm@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: CodFrm <22783163+CodFrm@users.noreply.github.com>
概述 Descriptions
close #1035 #942 #1077 #964
变更内容 Changes
截图 Screenshots