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:
2026-06-04 01:55:40 +00:00
parent 457d12834f
commit 9a7a5edd6e
5 changed files with 7 additions and 11 deletions
+1 -3
View File
@@ -12,14 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import time
import asyncio
from collections import OrderedDict
from kilostar.utils.standalone_proxy import actor_class
from kilostar.utils.standalone_proxy import actor_class, _STANDALONE
from kilostar.utils.ray_hook import ray_actor_hook
_STANDALONE = os.environ.get("KILOSTAR_MODE", "distributed") == "standalone"
if _STANDALONE:
from asyncio import Queue
else: