From 637706decd02ae9c0601a5917a1c1d58b52cf62f Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 9 Nov 2023 19:31:07 +0800 Subject: [PATCH] :art: Automatically purge unreferenced data snapshots older than 30 days https://github.com/siyuan-note/siyuan/issues/9613 --- kernel/conf/repo.go | 7 ++----- kernel/model/conf.go | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/kernel/conf/repo.go b/kernel/conf/repo.go index 8f6ec861e..7a4b6f107 100644 --- a/kernel/conf/repo.go +++ b/kernel/conf/repo.go @@ -23,14 +23,11 @@ import ( ) type Repo struct { - Key []byte `json:"key"` // AES 密钥 - HistoryRetentionDays int `json:"historyRetentionDays"` // 历史保留天数 + Key []byte `json:"key"` // AES 密钥 } func NewRepo() *Repo { - return &Repo{ - HistoryRetentionDays: 30, - } + return &Repo{} } func (*Repo) GetSaveDir() string { diff --git a/kernel/model/conf.go b/kernel/model/conf.go index a752547f5..fad41e45b 100644 --- a/kernel/model/conf.go +++ b/kernel/model/conf.go @@ -325,9 +325,6 @@ func InitConf() { if nil == Conf.Repo { Conf.Repo = conf.NewRepo() } - if 1 > Conf.Repo.HistoryRetentionDays { - Conf.Repo.HistoryRetentionDays = 30 - } if nil == Conf.Search { Conf.Search = conf.NewSearch()