compute agent dispatch affinity from target load (#4442)
* compute agent dispatch affinity from target load * fix test config
This commit is contained in:
+4
-1
@@ -1,5 +1,8 @@
|
||||
package agent
|
||||
|
||||
const DefaultTargetLoad = 0.7
|
||||
|
||||
type Config struct {
|
||||
EnableUserDataRecording bool `yaml:"enable_user_data_recording"`
|
||||
EnableUserDataRecording bool `yaml:"enable_user_data_recording"`
|
||||
TargetLoad float32 `yaml:"target_load,omitempty"`
|
||||
}
|
||||
|
||||
@@ -40,7 +40,12 @@ type TestServer struct {
|
||||
func NewTestServer(bus psrpc.MessageBus) *TestServer {
|
||||
localNode, _ := routing.NewLocalNode(nil)
|
||||
return NewTestServerWithService(must.Get(service.NewAgentService(
|
||||
&config.Config{Region: "test"},
|
||||
&config.Config{
|
||||
Region: "test",
|
||||
Agents: agent.Config{
|
||||
TargetLoad: agent.DefaultTargetLoad,
|
||||
},
|
||||
},
|
||||
localNode,
|
||||
bus,
|
||||
auth.NewSimpleKeyProvider("test", "verysecretsecret"),
|
||||
|
||||
Reference in New Issue
Block a user