fix: Don't crash when some agents fail to start
This commit is contained in:
@@ -107,7 +107,7 @@ func NewAgentPool(
|
|||||||
managers: make(map[string]sse.Manager),
|
managers: make(map[string]sse.Manager),
|
||||||
connectors: connectors,
|
connectors: connectors,
|
||||||
availableActions: availableActions,
|
availableActions: availableActions,
|
||||||
dynamicPrompt: promptBlocks,
|
dynamicPrompt: promptBlocks,
|
||||||
timeout: timeout,
|
timeout: timeout,
|
||||||
conversationLogs: conversationPath,
|
conversationLogs: conversationPath,
|
||||||
}, nil
|
}, nil
|
||||||
@@ -131,7 +131,7 @@ func NewAgentPool(
|
|||||||
pool: *poolData,
|
pool: *poolData,
|
||||||
connectors: connectors,
|
connectors: connectors,
|
||||||
localRAGAPI: LocalRAGAPI,
|
localRAGAPI: LocalRAGAPI,
|
||||||
dynamicPrompt: promptBlocks,
|
dynamicPrompt: promptBlocks,
|
||||||
availableActions: availableActions,
|
availableActions: availableActions,
|
||||||
timeout: timeout,
|
timeout: timeout,
|
||||||
conversationLogs: conversationPath,
|
conversationLogs: conversationPath,
|
||||||
@@ -506,7 +506,7 @@ func (a *AgentPool) StartAll() error {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err := a.startAgentWithConfig(name, &config); err != nil {
|
if err := a.startAgentWithConfig(name, &config); err != nil {
|
||||||
return err
|
xlog.Error("Failed to start agent", "name", name, "error", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user