Skip to content

Commit 2172db4

Browse files
committed
fix: 规范yaml
1 parent 93872f9 commit 2172db4

File tree

1 file changed

+21
-27
lines changed

1 file changed

+21
-27
lines changed

server/config.yaml

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,20 @@ pgsql:
8484
log-mode: ""
8585
log-zap: false
8686

87-
db-list: [
88-
{
89-
disabled: true, # 是否启用
90-
type: "", # 数据库的类型,目前支持mysql、pgsql
91-
alias-name: "", # 数据库的名称,注意: alias-name 需要在db-list中唯一
92-
path: '',
93-
port: '',
94-
config: '',
95-
db-name: '',
96-
username: '',
97-
password: '',
98-
max-idle-conns: 10,
99-
max-open-conns: 100,
100-
log-mode: "",
101-
log-zap: false,
102-
}
103-
]
104-
87+
db-list:
88+
- disabled: true # 是否启用
89+
type: "" # 数据库的类型,目前支持mysql、pgsql
90+
alias-name: "" # 数据库的名称,注意: alias-name 需要在db-list中唯一
91+
path: ''
92+
port: ''
93+
config: ''
94+
db-name: ''
95+
username: ''
96+
password: ''
97+
max-idle-conns: 10
98+
max-open-conns: 100
99+
log-mode: ""
100+
log-zap: false
105101

106102

107103
# local configuration
@@ -179,15 +175,13 @@ excel:
179175
Timer:
180176
start: true
181177
spec: "@daily" # 定时任务详细配置参考 https://pkg.go.dev/github.com/robfig/cron/v3
182-
detail: [
183-
# tableName: 需要清理的表名
184-
# compareField: 需要比较时间的字段
185-
# interval: 时间间隔, 具体配置详看 time.ParseDuration() 中字符串表示 且不能为负数
186-
# 2160h = 24 * 30 * 3 -> 三个月
187-
{ tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" },
188-
{ tableName: "jwt_blacklists" , compareField: "created_at", interval: "168h" }
189-
#{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
190-
]
178+
detail:
179+
- tableName: "sys_operation_records"
180+
compareField: "created_at"
181+
interval: "2160h"
182+
- tableName: "jwt_blacklists"
183+
compareField: "created_at"
184+
interval: "168h"
191185

192186
# 跨域配置
193187
# 需要配合 server/initialize/router.go#L32 使用

0 commit comments

Comments
 (0)