ray.serve.schema.TaskProcessorAdapter#
- class ray.serve.schema.TaskProcessorAdapter(*args, **kwargs)[source]#
Bases:
ABC
Abstract base class for task processing adapters.
Subclasses can support different combinations of sync and async operations. Use supports_async_capability() to check if a specific async operation is supported.
PublicAPI (alpha): This API is in alpha and may change before becoming stable.
Methods
Initialize the TaskProcessorAdapter.
Cancel a task.
Cancel a task synchronously.
Enqueue a task asynchronously.
Enqueue a task for execution synchronously.
Get metrics asynchronously.
Get metrics synchronously.
Get task status asynchronously.
Retrieve the current status of a task synchronously.
Perform health check asynchronously.
Perform health check synchronously.
Initialize the task processor.
Register a function as a task handler.
Shutdown the task processor and clean up resources.
Start the task consumer/worker process.
Stop the task consumer gracefully.