RequestQueueClient
Hierarchy
- BaseRequestQueueClient
- RequestQueueClient
Index
Methods
__init__
Parameters
optionalkeyword-onlymemory_storage_client: MemoryStorageClient
optionalkeyword-onlyid: str | None = None
optionalkeyword-onlyname: str | None = None
optionalkeyword-onlycreated_at: datetime | None = None
optionalkeyword-onlyaccessed_at: datetime | None = None
optionalkeyword-onlymodified_at: datetime | None = None
optionalkeyword-onlyhandled_request_count: int = 0
optionalkeyword-onlypending_request_count: int = 0
Returns None
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
update_timestamps
Update the timestamps of the request queue.
Parameters
optionalkeyword-onlyhas_been_modified: bool
Returns None
Properties
resource_directory
Get the resource directory for the client.
resource_info
Get the resource info for the request queue client.
Subclient for manipulating a single request queue.