upd
This commit is contained in:
@@ -81,3 +81,11 @@ func WorkerCount() int {
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// SetWorkers 运行时更新 worker 数量(用于从数据库读取配置后覆盖文件配置)。
|
||||
func SetWorkers(workers int) {
|
||||
if workers < 0 {
|
||||
workers = 0
|
||||
}
|
||||
appConfig.Workers = workers
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user