QueueReference Class
Utility class to associate a queue with its specific lock.
Note: This class is marked as 'experimental' and may change in the future.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Constructor
QueueReference(*, queue: deque = None, queue_lock: Annotated[Lock, SkipValidation()] = None, receive_task: Annotated[Task | None, SkipValidation()] = None, receive_failure: Exception | None = None)
Keyword-Only Parameters
| Name | Description |
|---|---|
|
queue
Required
|
|
|
queue_lock
Required
|
|
|
receive_task
Required
|
|
|
receive_failure
Required
|
|
Methods
| validate_receive_task |
Validate the receive task. |
validate_receive_task
Validate the receive task.
validate_receive_task(values: Any)
Parameters
| Name | Description |
|---|---|
|
values
Required
|
|
Attributes
is_empty
Check if the queue is empty.
is_experimental
is_experimental = True
queue
queue: deque
queue_lock
queue_lock: Annotated[Lock, SkipValidation()]
receive_failure
receive_failure: Exception | None
receive_task
receive_task: Annotated[Task | None, SkipValidation()]
stage_status
stage_status = 'experimental'