Repository navigation
feat(updates): 运行期间定期检查更新,唤醒与联网恢复后补查 - #310
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
客户端长时间驻留托盘时,启动后发布的新版本不会被自动发现。本 PR 在桌面主进程增加单一软件更新调度器,默认每 4 小时检查,唤醒或联网恢复后按到期时间及失败状态补查。
调度复用现有 Windows / Sparkle 更新后端和更新提示。检查失败后按 1、5、15 分钟退避,之后回到 4 小时间隔;手动检查重置自动检查时间。关闭软件更新停止自动检查,下载、待安装、安装和退出过程中跳过检查。调度进入现有控制器队列后再次校验状态,避免与用户操作交错。配置与 Skills 更新仍使用各自原有流程。
验证:已同步至 DSH 0.2.2-rc.3 并构建实际 Electron 壳。Windows 本地 180 项更新相关单测通过,1 项平台限定测试随 macOS CI 运行。另用从源码构建的 Windows 更新器和真实公版更新源,在独立 0.4.12 测试目录发现 0.4.13。将调度时钟推进四小时,模拟离线后联网与连续唤醒,确认仅补查一次、返回可用更新且没有触发下载安装;关闭更新后再次推进时钟,检查次数保持不变。物理休眠和四小时自然驻留未单独实测。
Fixes #293