BaseRequestQueueClient
Hierarchy
- BaseRequestQueueClient
Index
Methods
add_request
Add a request to the queue.
Parameters
optionalkeyword-onlyrequest: Request
The request to add to the queue.
optionalkeyword-onlyforefront: bool = False
Whether to add the request to the head or the end of the queue.
Returns ProcessedRequest
batch_add_requests
Add a batch of requests to the queue.
Parameters
optionalkeyword-onlyrequests: Sequence[Request]
The requests to add to the queue.
optionalkeyword-onlyforefront: bool = False
Whether to add the requests to the head or the end of the queue.
Returns BatchRequestsOperationResponse
batch_delete_requests
Delete given requests from the queue.
Parameters
optionalkeyword-onlyrequests: list[Request]
The requests to delete from the queue.
Returns BatchRequestsOperationResponse
delete
Permanently delete the request queue managed by this client.
Returns None
delete_request
Delete a request from the queue.
Parameters
optionalkeyword-onlyrequest_id: str
ID of the request to delete.
Returns None
delete_request_lock
Delete the lock on a specific request in the queue.
Parameters
optionalkeyword-onlyrequest_id: str
ID of the request to delete the lock.
optionalkeyword-onlyforefront: bool = False
Whether to put the request in the beginning or the end of the queue after the lock is deleted.
Returns None
get
Get metadata about the request queue being managed by this client.
Returns RequestQueueMetadata | None
get_request
Retrieve a request from the queue.
Parameters
optionalkeyword-onlyrequest_id: str
ID of the request to retrieve.
Returns Request | None
list_and_lock_head
Fetch and lock a specified number of requests from the start of the queue.
Retrieves and locks the first few requests of a queue for the specified duration. This prevents the requests from being fetched by another client until the lock expires.
Parameters
optionalkeyword-onlylock_secs: int
Duration for which the requests are locked, in seconds.
optionalkeyword-onlylimit: int | None = None
Maximum number of requests to retrieve and lock.
Returns RequestQueueHeadWithLocks
list_head
Retrieve a given number of requests from the beginning of the queue.
Parameters
optionalkeyword-onlylimit: int | None = None
How many requests to retrieve.
Returns RequestQueueHead
prolong_request_lock
Prolong the lock on a specific request in the queue.
Parameters
optionalkeyword-onlyrequest_id: str
The identifier of the request whose lock is to be prolonged.
optionalkeyword-onlyforefront: bool = False
Whether to put the request in the beginning or the end of the queue after lock expires.
optionalkeyword-onlylock_secs: int
The additional amount of time, in seconds, that the request will remain locked.
Returns ProlongRequestLockResponse
update
Update the request queue metadata.
Parameters
optionalkeyword-onlyname: str | None = None
New new name for the request queue.
Returns RequestQueueMetadata
update_request
Update a request in the queue.
Parameters
optionalkeyword-onlyrequest: Request
The updated request.
optionalkeyword-onlyforefront: bool = False
Whether to put the updated request in the beginning or the end of the queue.
Returns ProcessedRequest
Abstract base class for request queue resource clients.
These clients are specific to the type of resource they manage and operate under a designated storage client, like a memory storage client.