chore: stabilize lint and verify builds
This commit is contained in:
@@ -45,15 +45,16 @@ const (
|
||||
)
|
||||
|
||||
// queueConfig returns a river.QueueConfig map built from QueueWorkers or defaults.
|
||||
func (c *Config) queueConfig() map[string]river.QueueConfig {
|
||||
func (config *Config) queueConfig() map[string]river.QueueConfig {
|
||||
cfg := map[string]river.QueueConfig{}
|
||||
if c == nil || len(c.QueueWorkers) == 0 {
|
||||
if config == nil || len(config.QueueWorkers) == 0 {
|
||||
cfg[QueueHigh] = river.QueueConfig{MaxWorkers: 10}
|
||||
cfg[QueueDefault] = river.QueueConfig{MaxWorkers: 10}
|
||||
cfg[QueueLow] = river.QueueConfig{MaxWorkers: 10}
|
||||
|
||||
return cfg
|
||||
}
|
||||
for name, n := range c.QueueWorkers {
|
||||
for name, n := range config.QueueWorkers {
|
||||
if n <= 0 {
|
||||
n = 1
|
||||
}
|
||||
@@ -63,5 +64,6 @@ func (c *Config) queueConfig() map[string]river.QueueConfig {
|
||||
if _, ok := cfg[QueueDefault]; !ok {
|
||||
cfg[QueueDefault] = river.QueueConfig{MaxWorkers: 10}
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user