Remove concurrency config
Inference engines handle this now.
This commit is contained in:
@@ -20,9 +20,6 @@ type Config struct {
|
||||
// Address is the host:port to listen on.
|
||||
Address string `yaml:"address"`
|
||||
|
||||
// Concurrency is the number of concurrent requests to allow.
|
||||
// Defaults to 1.
|
||||
Concurrency int `yaml:"concurrency"`
|
||||
// ShutdownTimeout is the maximum time to wait for graceful shutdown.
|
||||
// Defaults to "30s".
|
||||
ShutdownTimeout string `yaml:"shutdown_timeout"`
|
||||
@@ -42,9 +39,6 @@ type Config struct {
|
||||
// ApplyDefaults sets default values for optional configuration fields.
|
||||
// Called automatically by Load before validation.
|
||||
func (cfg *Config) ApplyDefaults() {
|
||||
if cfg.Concurrency == 0 {
|
||||
cfg.Concurrency = 1
|
||||
}
|
||||
if cfg.ShutdownTimeout == "" {
|
||||
cfg.ShutdownTimeout = "30s"
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import (
|
||||
func validConfig() string {
|
||||
return `
|
||||
address: ":9090"
|
||||
concurrency: 2
|
||||
shutdown_timeout: "60s"
|
||||
|
||||
llm:
|
||||
@@ -55,12 +54,6 @@ func TestLoad(t *testing.T) {
|
||||
cfg.Address, ":9090",
|
||||
)
|
||||
}
|
||||
if cfg.Concurrency != 2 {
|
||||
t.Errorf(
|
||||
"Concurrency = %d, want 2",
|
||||
cfg.Concurrency,
|
||||
)
|
||||
}
|
||||
if cfg.ShutdownTimeout != "60s" {
|
||||
t.Errorf(
|
||||
"ShutdownTimeout = %q, want %q",
|
||||
@@ -96,12 +89,6 @@ tts:
|
||||
cfg.Address, ":8080",
|
||||
)
|
||||
}
|
||||
if cfg.Concurrency != 1 {
|
||||
t.Errorf(
|
||||
"Concurrency = %d, want 1",
|
||||
cfg.Concurrency,
|
||||
)
|
||||
}
|
||||
if cfg.ShutdownTimeout != "30s" {
|
||||
t.Errorf(
|
||||
"ShutdownTimeout = %q, want %q",
|
||||
@@ -365,9 +352,6 @@ func TestApplyDefaults(t *testing.T) {
|
||||
if cfg.Address != ":8080" {
|
||||
t.Errorf("Address = %q, want %q", cfg.Address, ":8080")
|
||||
}
|
||||
if cfg.Concurrency != 1 {
|
||||
t.Errorf("Concurrency = %d, want 1", cfg.Concurrency)
|
||||
}
|
||||
if cfg.ShutdownTimeout != "30s" {
|
||||
t.Errorf(
|
||||
"ShutdownTimeout = %q, want %q",
|
||||
@@ -379,7 +363,6 @@ func TestApplyDefaults(t *testing.T) {
|
||||
func TestApplyDefaults_NoOverwrite(t *testing.T) {
|
||||
cfg := &Config{
|
||||
Address: ":9999",
|
||||
Concurrency: 5,
|
||||
ShutdownTimeout: "120s",
|
||||
}
|
||||
cfg.ApplyDefaults()
|
||||
@@ -387,9 +370,6 @@ func TestApplyDefaults_NoOverwrite(t *testing.T) {
|
||||
if cfg.Address != ":9999" {
|
||||
t.Errorf("Address = %q, want %q", cfg.Address, ":9999")
|
||||
}
|
||||
if cfg.Concurrency != 5 {
|
||||
t.Errorf("Concurrency = %d, want 5", cfg.Concurrency)
|
||||
}
|
||||
if cfg.ShutdownTimeout != "120s" {
|
||||
t.Errorf(
|
||||
"ShutdownTimeout = %q, want %q",
|
||||
|
||||
Reference in New Issue
Block a user