File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 3535from vllm_router .routers .routing_logic import (
3636 get_routing_logic ,
3737 initialize_routing_logic ,
38+ DisaggregatedPrefillRouter ,
3839)
3940from vllm_router .service_discovery import (
4041 ServiceDiscoveryType ,
@@ -97,13 +98,16 @@ async def lifespan(app: FastAPI):
9798
9899 app .state .event_loop = asyncio .get_event_loop ()
99100
100- # Start the ZMQ task
101- await start_zmq_task ()
101+ # only start the ZMQ task if the routing logic is RoutingLogic.DISAGGREGATED_PREFILL
102+ if isinstance (app .state .router , DisaggregatedPrefillRouter ):
103+ logger .info ("Starting ZMQ task because the routing logic is RoutingLogic.DISAGGREGATED_PREFILL" )
104+ # Start the ZMQ task
105+ await start_zmq_task ()
102106
103- yield
107+ yield
104108
105- # Stop the ZMQ task
106- await stop_zmq_task ()
109+ # Stop the ZMQ task
110+ await stop_zmq_task ()
107111
108112 await app .state .aiohttp_client_wrapper .stop ()
109113
You can’t perform that action at this time.
0 commit comments