refactor(standalone): 收敛 _STANDALONE 判断到 standalone_proxy 单一来源
各模块不再各自读 os.environ,统一从 standalone_proxy._STANDALONE 导入, 环境变量只在一处决定模式,减少散落的重复逻辑。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,8 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
from fastapi.responses import FileResponse, JSONResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
_STANDALONE = os.environ.get("KILOSTAR_MODE", "distributed") == "standalone"
|
||||
from kilostar.utils.standalone_proxy import _STANDALONE
|
||||
|
||||
if not _STANDALONE:
|
||||
from ray import serve
|
||||
|
||||
|
||||
Reference in New Issue
Block a user