fix: git clone 操作 timeout 设为 120s
This commit is contained in:
parent
46239bccc7
commit
9c84c3dcbc
@ -895,7 +895,7 @@ if action == 'send_message':
|
||||
# 特殊处理:包含"到本地""到工作区"→只保留 git clone url
|
||||
cmd = re.sub(r'(\s+(到本地|到工作区|到workspace).*)', '', cmd).strip()
|
||||
workdir = ctx.get('workspace_dir', '') or '/d/pipeline/workspaces'
|
||||
result = await shell_exec(cmd, workdir=workdir)
|
||||
result = await shell_exec(cmd, workdir=workdir, timeout=120 if 'git clone' in cmd else 60)
|
||||
if result['rc'] == 0:
|
||||
out = result['stdout'].strip()
|
||||
agent_reply = f"执行成功。{'输出:' + out[:500] if out else '(无输出)'}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user