Skip to content

Commit 94e60b0

Browse files
refactor: optimize timeout exception msg.
1 parent 3bfe400 commit 94e60b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/common/utils/tool_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def _exec_sandbox(self, _code):
254254
if proc.poll() is None: #如果仍未终止,强制终止
255255
os.killpg(pgid, signal.SIGKILL)
256256
proc.wait()
257-
raise Exception(_("Process execution timed out.")) # 执行超时,到了MAXKB_SANDBOX_PYTHON_PROCESS_TIMEOUT_SECONDS限制
257+
raise Exception(_(f"Process execution timed out after {self.process_timeout_seconds} seconds."))
258258

259259
def validate_mcp_transport(self, code_str):
260260
servers = json.loads(code_str)

0 commit comments

Comments
 (0)