Fix config for GOOSE_MAX_BACKGROUND_TASKS (#7940)

Signed-off-by: alexyao2015 <alexyao2015@users.noreply.github.com>
Co-authored-by: alexyao2015 <alexyao2015@users.noreply.github.com>
This commit is contained in:
Alex Yao
2026-03-20 21:54:51 +08:00
committed by GitHub
parent 354e2e1d5f
commit 5836f6fa4c
@@ -471,9 +471,8 @@ fn current_epoch_millis() -> u64 {
/// Get maximum number of concurrent background tasks
fn max_background_tasks() -> usize {
std::env::var("GOOSE_MAX_BACKGROUND_TASKS")
.ok()
.and_then(|v| v.parse().ok())
Config::global()
.get_param::<usize>("GOOSE_MAX_BACKGROUND_TASKS")
.unwrap_or(5)
}