feat: add scheduler config
This commit is contained in:
@@ -30,8 +30,9 @@ const (
|
||||
DefaultTaskTimeout = 30
|
||||
|
||||
// Settings Section 常量
|
||||
SectionSite = "site"
|
||||
SectionSystem = "system"
|
||||
SectionSite = "site"
|
||||
SectionSystem = "system"
|
||||
SectionScheduler = "scheduler"
|
||||
|
||||
// Site Settings Key 常量
|
||||
KeyTitle = "title"
|
||||
@@ -42,6 +43,11 @@ const (
|
||||
|
||||
// System Settings Key 常量
|
||||
KeyInitialized = "initialized"
|
||||
|
||||
// Scheduler Settings Key 常量
|
||||
KeyWorkerCount = "worker_count"
|
||||
KeyQueueSize = "queue_size"
|
||||
KeyRateInterval = "rate_interval"
|
||||
)
|
||||
|
||||
// TablePrefix 表前缀,从配置文件读取
|
||||
@@ -62,4 +68,9 @@ var DefaultSettings = map[string]map[string]string{
|
||||
KeyPageSize: "10",
|
||||
KeyCookieDays: "7",
|
||||
},
|
||||
SectionScheduler: {
|
||||
KeyWorkerCount: "4",
|
||||
KeyQueueSize: "100",
|
||||
KeyRateInterval: "200",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user