Merge branch 'develop' of http://8.153.151.51:8888/team_group/model-develop into develop
# Conflicts: # schedule/src/schedule/orchestrator.py # schedule/src/schedule/worker.py
This commit is contained in:
@@ -54,6 +54,10 @@ class Settings(BaseSettings):
|
||||
default="http://runtime:8000",
|
||||
description="Backend → Runtime HTTP endpoint.",
|
||||
)
|
||||
rclone_rc_url: str = Field(
|
||||
default="http://runtime:5572",
|
||||
description="Backend → rclone RC HTTP endpoint (VFS cache invalidation).",
|
||||
)
|
||||
|
||||
# ── RustFS object storage ────────────────────────────────────
|
||||
rustfs_endpoint: str = Field(
|
||||
|
||||
@@ -12,6 +12,7 @@ specific concerns:
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import socket
|
||||
import subprocess
|
||||
import time
|
||||
@@ -30,6 +31,7 @@ def start_process(
|
||||
cmd: list[str],
|
||||
workspace_path: Path,
|
||||
log_dir: str | Path = "/tmp/process_logs",
|
||||
env: dict[str, str] | None = None,
|
||||
) -> tuple[subprocess.Popen, Path]:
|
||||
"""Launch ``cmd`` as a subprocess and return ``(process, log_file)``.
|
||||
|
||||
@@ -44,6 +46,11 @@ def start_process(
|
||||
start_time = time.strftime("%Y%m%d_%H%M%S")
|
||||
temp_log = log_dir_path / f"process_start_{start_time}.log"
|
||||
|
||||
# 构建合并后的环境变量
|
||||
full_env = os.environ.copy()
|
||||
if env:
|
||||
full_env.update(env)
|
||||
|
||||
with open(temp_log, "a", buffering=1) as log_file:
|
||||
process = subprocess.Popen(
|
||||
cmd,
|
||||
@@ -51,6 +58,7 @@ def start_process(
|
||||
stdout=log_file,
|
||||
stderr=subprocess.STDOUT,
|
||||
start_new_session=True,
|
||||
env=full_env,
|
||||
)
|
||||
|
||||
final_log = log_dir_path / f"process_{process.pid}_{start_time}.log"
|
||||
|
||||
Reference in New Issue
Block a user