新增定时任务封装以及配置自动清理数据库功能
新增 - server/config/timer.go - server/initialize/timer.go - server/utils/db_automation.go - server/utils/timer/timed_task.go 修改 - server/config.yaml - server/config/config/go - server/global/global.go - server/main.go
This commit is contained in:
@@ -18,4 +18,5 @@ type Server struct {
|
||||
AliyunOSS AliyunOSS `mapstructure:"aliyun-oss" json:"aliyunOSS" yaml:"aliyun-oss"`
|
||||
TencentCOS TencentCOS `mapstructure:"tencent-cos" json:"tencentCOS" yaml:"tencent-cos"`
|
||||
Excel Excel `mapstructure:"excel" json:"excel" yaml:"excel"`
|
||||
Timer Timer `mapstructure:"timer" json:"timer" yaml:"timer"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package config
|
||||
|
||||
type Timer struct {
|
||||
Start bool `mapstructure:"start" json:"start" yaml:"start"`
|
||||
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"`
|
||||
Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"`
|
||||
}
|
||||
|
||||
type Detail struct {
|
||||
TableName string `mapstructure:"tableName" json:"tableName" yaml:"tableName"`
|
||||
CompareField string `mapstructure:"compareField" json:"compareField" yaml:"compareField"`
|
||||
Interval string `mapstructure:"interval" json:"interval" yaml:"interval"`
|
||||
}
|
||||
Reference in New Issue
Block a user