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:
@@ -471,9 +471,8 @@ fn current_epoch_millis() -> u64 {
|
|||||||
|
|
||||||
/// Get maximum number of concurrent background tasks
|
/// Get maximum number of concurrent background tasks
|
||||||
fn max_background_tasks() -> usize {
|
fn max_background_tasks() -> usize {
|
||||||
std::env::var("GOOSE_MAX_BACKGROUND_TASKS")
|
Config::global()
|
||||||
.ok()
|
.get_param::<usize>("GOOSE_MAX_BACKGROUND_TASKS")
|
||||||
.and_then(|v| v.parse().ok())
|
|
||||||
.unwrap_or(5)
|
.unwrap_or(5)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user