Skip to content

Commit

Permalink
🎨 Automatically purge unreferenced data snapshots older than 30 days #…
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Nov 9, 2023
1 parent e408ca6 commit 637706d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 2 additions & 5 deletions kernel/conf/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions kernel/model/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 637706d

Please sign in to comment.