Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions miles/router/middleware_hub/radix_tree_middleware.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import json
import os

from fastapi.responses import JSONResponse
from starlette.middleware.base import BaseHTTPMiddleware
Expand Down Expand Up @@ -64,9 +65,7 @@ def __init__(self, app, *, router):
# cache state would survive scheduler shrink/expand. Re-enabling
# under RLix mode requires a partial_rollout + radix_tree adapter
# (not in scope for any current milestone).
import os as _os # local import — module top imports must change

if _os.environ.get("RLIX_CONTROL_PLANE") == "rlix":
if os.environ.get("RLIX_CONTROL_PLANE") == "rlix":
raise RuntimeError(
"RadixTreeMiddleware is forbidden in RLix mode "
"(RLIX_CONTROL_PLANE=rlix). partial_rollout + radix_tree "
Expand Down