🎨 Automatically purge unreferenced data snapshots older than 30 days https://github.com/siyuan-note/siyuan/issues/9613

This commit is contained in:
Daniel 2023-11-09 19:31:07 +08:00
parent e408ca69b7
commit 637706decd
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 2 additions and 8 deletions

View file

@ -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 {

View file

@ -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()