Skip to content

Commit

Permalink
add global OS_MAX_THREADS env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Nov 26, 2024
1 parent af7d763 commit 1845018
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1845018

Please sign in to comment.