清理掉定时任务config配置,修改为代码内书写 (#1578)

This commit is contained in:
奇淼(piexlmax
2023-11-20 23:38:15 +08:00
committed by GitHub
parent 4433b6623e
commit bd2a3ddfba
7 changed files with 82 additions and 77 deletions

View File

@@ -26,7 +26,6 @@ type Server struct {
AwsS3 AwsS3 `mapstructure:"aws-s3" json:"aws-s3" yaml:"aws-s3"`
Excel Excel `mapstructure:"excel" json:"excel" yaml:"excel"`
Timer Timer `mapstructure:"timer" json:"timer" yaml:"timer"`
// 跨域配置
Cors CORS `mapstructure:"cors" json:"cors" yaml:"cors"`

View File

@@ -1,15 +0,0 @@
package config
type Timer struct {
Spec string `mapstructure:"spec" json:"spec" yaml:"spec"` // CRON表达式
Detail []Detail `mapstructure:"detail" json:"detail" yaml:"detail"`
Start bool `mapstructure:"start" json:"start" yaml:"start"` // 是否启用
WithSeconds bool `mapstructure:"with_seconds" json:"with_seconds" yaml:"with_seconds"` // 是否精确到秒
}
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"` // 时间间隔
}