🎨 桌面端自动下载更新安装包 https://github.com/siyuan-note/siyuan/issues/5837

This commit is contained in:
Liang Ding 2022-09-07 22:43:14 +08:00
parent 9531bdd01c
commit e2a6780cec
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
14 changed files with 155 additions and 16 deletions

View file

@ -144,11 +144,11 @@ func LoadUploadToken() (err error) {
}
var (
refreshUserTicker = time.NewTicker(2 * time.Hour)
refreshCheckTicker = time.NewTicker(2 * time.Hour)
subscriptionExpirationReminded bool
)
func AutoRefreshUser() {
func AutoRefreshCheck() {
for {
if !subscriptionExpirationReminded {
subscriptionExpirationReminded = true
@ -235,7 +235,12 @@ func AutoRefreshUser() {
}
}()
<-refreshUserTicker.C
go func() {
defer logging.Recover()
checkDownloadInstallPkg()
}()
<-refreshCheckTicker.C
}
}