Skip to content

Commit 6982fd2

Browse files
authored
fix: extend agent role command timeout (#12464)
1 parent 04fd456 commit 6982fd2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

agent/app/service/agents_agents.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (a AgentService) CreateRole(req dto.AgentRoleCreateReq) (*dto.AgentRoleCrea
4343
args = append(args, "--agent-dir", agentDir)
4444
args = append(args, "--non-interactive", "--json")
4545

46-
mgr := cmd.NewCommandMgr(cmd.WithTimeout(2 * time.Minute))
46+
mgr := cmd.NewCommandMgr(cmd.WithTimeout(5 * time.Minute))
4747
output, err := mgr.RunWithStdout("docker", args...)
4848
if err != nil {
4949
return nil, err
@@ -127,7 +127,7 @@ func (a AgentService) DeleteRole(req dto.AgentRoleDeleteReq) error {
127127

128128
args := []string{"exec", install.ContainerName, "openclaw", "agents", "delete", req.ID, "--force"}
129129

130-
mgr := cmd.NewCommandMgr(cmd.WithTimeout(2 * time.Minute))
130+
mgr := cmd.NewCommandMgr(cmd.WithTimeout(5 * time.Minute))
131131
if _, err = mgr.RunWithStdout("docker", args...); err != nil {
132132
return err
133133
}
@@ -182,7 +182,7 @@ func (a AgentService) operateRoleBinding(req dto.AgentRoleBindReq, action string
182182
binding,
183183
}
184184
args = append(args, "--json")
185-
mgr := cmd.NewCommandMgr(cmd.WithTimeout(2 * time.Minute))
185+
mgr := cmd.NewCommandMgr(cmd.WithTimeout(5 * time.Minute))
186186
_, err = mgr.RunWithStdout("docker", args...)
187187
return err
188188
}

0 commit comments

Comments
 (0)