github.com/turbot/steampipe@v1.7.0-rc.0.0.20240517123944-7cef272d4458/pkg/db/db_common/max_connections.go (about)

     1  package db_common
     2  
     3  import (
     4  	"github.com/spf13/viper"
     5  	"github.com/turbot/steampipe/pkg/constants"
     6  )
     7  
     8  func MaxDbConnections() int {
     9  	maxParallel := constants.DefaultMaxConnections
    10  	if viper.IsSet(constants.ArgMaxParallel) {
    11  		maxParallel = viper.GetInt(constants.ArgMaxParallel)
    12  	}
    13  	return maxParallel
    14  }