refactor resource limit function

This commit is contained in:
0ceanSlim 2024-09-05 11:04:12 -04:00
parent 82a45048f5
commit 0ab753bb2c
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ var (
goroutineQueueMutex sync.Mutex goroutineQueueMutex sync.Mutex
) )
func ApplyResourceLimits(cfg *configTypes.ResourceLimits) { func SetResourceLimit(cfg *configTypes.ResourceLimits) {
// Set CPU cores // Set CPU cores
runtime.GOMAXPROCS(cfg.CPUCores) runtime.GOMAXPROCS(cfg.CPUCores)

View File

@ -39,7 +39,7 @@ func main() {
log.Fatal("Error loading config: ", err) log.Fatal("Error loading config: ", err)
} }
config.ApplyResourceLimits(&cfg.ResourceLimits) // Apply limits once before starting the server config.SetResourceLimit(&cfg.ResourceLimits) // Apply limits once before starting the server
client, err := db.InitDB(cfg) client, err := db.InitDB(cfg)
if err != nil { if err != nil {