diff --git a/env/env.go b/env/env.go index 69ed094b..f7dfa84f 100644 --- a/env/env.go +++ b/env/env.go @@ -8,8 +8,14 @@ import ( ) var ( - TLS_VERIFY = os.Getenv("TLS_VERIFY") == "true" - DEBUG = os.Getenv("DEBUG") == "true" + TLS_VERIFY = os.Getenv("TLS_VERIFY") == "true" + DEBUG = os.Getenv("DEBUG") == "true" + OS_MAX_THREADS = func() int { + if value, err := strconv.Atoi(os.Getenv("OS_MAX_THREADS")); err == nil && value != 0 { + return value + } + return 10000 + }() ) // ExpandWithEnv updates string variables to their corresponding environment values.