Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

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

Daniel637706decd02
diff --git a/kernel/conf/repo.go b/kernel/conf/repo.go
index 8f6ec861e4..7a4b6f1070 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 a752547f58..fad41e45bd 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()