feat: add scheduler config

This commit is contained in:
engigu
2025-12-22 16:05:07 +08:00
parent 03f4fa7b5c
commit be3527cb61
12 changed files with 387 additions and 52 deletions
+13 -2
View File
@@ -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",
},
}