Quellcode durchsuchen

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

Daniel vor 1 Jahr
Ursprung
Commit
637706decd
2 geänderte Dateien mit 2 neuen und 8 gelöschten Zeilen
  1. 2 5
      kernel/conf/repo.go
  2. 0 3
      kernel/model/conf.go

+ 2 - 5
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 {

+ 0 - 3
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()