mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 03:10:57 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
5ec0247a2d
@ -32,6 +32,7 @@ func StartCron() {
|
||||
go every(5*time.Second, task.StatusJob)
|
||||
go every(5*time.Second, model.SyncDataJob)
|
||||
go every(2*time.Hour, model.StatJob)
|
||||
go every(6*time.Hour, util.RefreshRhyResultJob)
|
||||
go every(2*time.Hour, model.RefreshCheckJob)
|
||||
go every(3*time.Second, model.FlushUpdateRefTextRenameDocJob)
|
||||
go every(util.SQLFlushInterval, sql.FlushTxJob)
|
||||
@ -43,7 +44,7 @@ func StartCron() {
|
||||
go every(30*time.Second, model.FlushAssetsTextsJob)
|
||||
go every(30*time.Second, model.HookDesktopUIProcJob)
|
||||
go every(24*time.Hour, model.AutoPurgeRepoJob)
|
||||
go every(30*time.Minute, model.AutoCheckMicrosoftDefender)
|
||||
go every(30*time.Minute, model.AutoCheckMicrosoftDefenderJob)
|
||||
|
||||
// TODO: 移除旧方案 https://github.com/siyuan-note/siyuan/issues/14414 实现新的刷新机制
|
||||
//go every(3*time.Second, model.WatchLocalShorthands)
|
||||
|
@ -215,7 +215,6 @@ var (
|
||||
)
|
||||
|
||||
func RefreshCheckJob() {
|
||||
go util.GetRhyResult(true) // 发一次请求进行结果缓存
|
||||
go refreshSubscriptionExpirationRemind()
|
||||
go refreshUser()
|
||||
go refreshAnnouncement()
|
||||
|
@ -87,7 +87,7 @@ func AddMicrosoftDefenderExclusion() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func AutoCheckMicrosoftDefender() {
|
||||
func AutoCheckMicrosoftDefenderJob() {
|
||||
time.Sleep(7 * time.Second)
|
||||
microsoftDefenderLock.Lock()
|
||||
defer microsoftDefenderLock.Unlock()
|
||||
|
@ -58,3 +58,7 @@ func GetRhyResult(force bool) (map[string]interface{}, error) {
|
||||
rhyResultCacheTime = now
|
||||
return cachedRhyResult, nil
|
||||
}
|
||||
|
||||
func RefreshRhyResultJob() {
|
||||
GetRhyResult(true)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user