feat: wake reconciled sessions for queued dispatch
This commit is contained in:
@@ -69,9 +69,11 @@ func run(configPath string) error {
|
||||
return err
|
||||
}
|
||||
defer func() { _ = cleanupControl() }()
|
||||
registry := session.NewRegistry()
|
||||
controlService, err := control.NewService(control.Options{
|
||||
Store: persistence, DefaultQueueTTL: configured.Queue.DefaultTTL, DefaultQueueTTLSet: true,
|
||||
Limits: agentproto.Limits{MaxEnvelopeBytes: configured.Protocol.MaxAgentEnvelopeBytes, MaxExecutionSpecBytes: configured.Protocol.MaxExecutionSpecBytes, MaxRawChunkBytes: configured.Protocol.MaxRawChunkBytes, MaxScriptBytes: configured.Protocol.MaxScriptBytes, MaxDetailBytes: configured.Storage.ProtocolDetailMaxBytes},
|
||||
WakeClient: registry.Wake,
|
||||
Limits: agentproto.Limits{MaxEnvelopeBytes: configured.Protocol.MaxAgentEnvelopeBytes, MaxExecutionSpecBytes: configured.Protocol.MaxExecutionSpecBytes, MaxRawChunkBytes: configured.Protocol.MaxRawChunkBytes, MaxScriptBytes: configured.Protocol.MaxScriptBytes, MaxDetailBytes: configured.Storage.ProtocolDetailMaxBytes},
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -79,7 +81,7 @@ func run(configPath string) error {
|
||||
grpcServer := grpc.NewServer(grpc.MaxRecvMsgSize(int(configured.Protocol.MaxControlRequestBytes)), grpc.MaxSendMsgSize(int(configured.Protocol.MaxControlRequestBytes)))
|
||||
rvboxv1.RegisterControlServer(grpcServer, controlService)
|
||||
agent := &session.AgentServer{
|
||||
Store: persistence, Registry: session.NewRegistry(), Path: configured.Server.AgentPath,
|
||||
Store: persistence, Registry: registry, Path: configured.Server.AgentPath,
|
||||
Limits: agentproto.Limits{
|
||||
MaxEnvelopeBytes: configured.Protocol.MaxAgentEnvelopeBytes,
|
||||
MaxExecutionSpecBytes: configured.Protocol.MaxExecutionSpecBytes,
|
||||
|
||||
Reference in New Issue
Block a user