增加部分数据清理周期设置

This commit is contained in:
GoEdgeLab
2023-07-01 17:57:49 +08:00
parent c1dc3d97bb
commit e8c15fd4b3
3 changed files with 229 additions and 15 deletions

View File

@@ -268,7 +268,7 @@ func (this *InstallAction) RunPost(params struct {
currentStatusText = "正在配置访问日志保留天数"
var accessLogKeepDays = dbMap.GetInt("accessLogKeepDays")
if accessLogKeepDays > 0 {
var config = &systemconfigs.DatabaseConfig{}
var config = systemconfigs.NewDatabaseConfig()
config.ServerAccessLog.Clean.Days = accessLogKeepDays
configJSON, err := json.Marshal(config)
if err != nil {
@@ -325,7 +325,7 @@ func (this *InstallAction) RunPost(params struct {
// 设置访问日志保留天数
var accessLogKeepDays = dbMap.GetInt("accessLogKeepDays")
if accessLogKeepDays > 0 {
var config = &systemconfigs.DatabaseConfig{}
var config = systemconfigs.NewDatabaseConfig()
config.ServerAccessLog.Clean.Days = accessLogKeepDays
configJSON, err := json.Marshal(config)
if err != nil {