mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-08 17:58:50 +01:00
♻️ Implement some delayed kernel events using task queues https://github.com/siyuan-note/siyuan/issues/12393
This commit is contained in:
parent
9088e49a76
commit
09eec52a02
10 changed files with 79 additions and 44 deletions
|
|
@ -239,7 +239,7 @@ func refreshSubscriptionExpirationRemind() {
|
|||
now := time.Now().UnixMilli()
|
||||
if now >= expired { // 已经过期
|
||||
if now-expired <= 1000*60*60*24*2 { // 2 天内提醒 https://github.com/siyuan-note/siyuan/issues/7816
|
||||
task.AppendTaskWithDelay(task.PushMsg, 30*time.Second, util.PushErrMsg, Conf.Language(128), 0)
|
||||
task.AppendAsyncTaskWithDelay(task.PushMsg, 30*time.Second, util.PushErrMsg, Conf.Language(128), 0)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -250,8 +250,7 @@ func refreshSubscriptionExpirationRemind() {
|
|||
}
|
||||
|
||||
if 0 < remains && expireDay > remains {
|
||||
util.WaitForUILoaded()
|
||||
task.AppendTaskWithDelay(task.PushMsg, 7*time.Second, util.PushErrMsg, fmt.Sprintf(Conf.Language(127), remains), 0)
|
||||
task.AppendAsyncTaskWithDelay(task.PushMsg, 7*time.Second, util.PushErrMsg, fmt.Sprintf(Conf.Language(127), remains), 0)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue