ray.serve.request_router.PendingRequest#

class ray.serve.request_router.PendingRequest(args: List[Any], kwargs: Dict[Any, Any], metadata: RequestMetadata, created_at: float = ..., future: Future = ..., routing_context: RequestRoutingContext = ...)[source]#

A request that is pending execution by a replica.

PublicAPI (alpha): This API is in alpha and may change before becoming stable.

Methods

reset_future

Reset the asyncio.Future, must be called if this request is re-used.

Attributes

args

Positional arguments for the request.

kwargs

Keyword arguments for the request.

metadata

Metadata for the request, including request ID and whether it's streaming.

created_at

Timestamp when the request was created.

future

An asyncio Future that will be set when the request is routed.

routing_context

Context for request routing, used to track routing attempts and backoff.