RequestQueueClientAsync
Index
Methods
add_request
Add a request to the queue.
https://docs.apify.com/api/v2#/reference/request-queues/request-collection/add-request
Parameters
request: dict
The request to add to the queue
keyword-onlyforefront: bool | None = None
Whether to add the request to the head or the end of the queue
Returns dict
The added request.
batch_add_requests
Add requests to the request queue in batches.
Requests are split into batches based on size and processed in parallel.
https://docs.apify.com/api/v2#/reference/request-queues/batch-request-operations/add-requests
Parameters
requests: list[dict]
keyword-onlyforefront: bool = False
keyword-onlymax_parallel: int = 5
keyword-onlymax_unprocessed_requests_retries: int = 3
keyword-onlymin_delay_between_unprocessed_requests_retries: timedelta = timedelta(milliseconds=500)
Returns BatchAddRequestsResult
batch_delete_requests
Delete given requests from the queue.
https://docs.apify.com/api/v2#/reference/request-queues/batch-request-operations/delete-requests
Parameters
requests: list[dict]
list of the requests to delete
Returns dict
delete
Delete the request queue.
https://docs.apify.com/api/v2#/reference/request-queues/queue/delete-request-queue
Returns None
delete_request
Delete a request from the queue.
https://docs.apify.com/api/v2#/reference/request-queues/request/delete-request
Parameters
request_id: str
ID of the request to delete.
Returns None
delete_request_lock
Delete the lock on a request.
https://docs.apify.com/api/v2#/reference/request-queues/request-lock/delete-request-lock
Parameters
request_id: str
ID of the request to delete the lock
keyword-onlyforefront: bool | None = None
Whether to put the request in the beginning or the end of the queue after the lock is deleted
Returns None
get
Retrieve the request queue.
https://docs.apify.com/api/v2#/reference/request-queues/queue/get-request-queue
Returns dict | None
The retrieved request queue, or None, if it does not exist
get_request
Retrieve a request from the queue.
https://docs.apify.com/api/v2#/reference/request-queues/request/get-request
Parameters
request_id: str
ID of the request to retrieve
Returns dict | None
The retrieved request, or None, if it did not exist.
list_and_lock_head
Retrieve a given number of unlocked requests from the beginning of the queue and lock them for a given time.
https://docs.apify.com/api/v2#/reference/request-queues/queue-head-with-locks/get-head-and-lock
Parameters
keyword-onlylock_secs: int
How long the requests will be locked for, in seconds
keyword-onlylimit: int | None = None
How many requests to retrieve
Returns dict
The desired number of locked requests from the beginning of the queue.
list_head
Retrieve a given number of requests from the beginning of the queue.
https://docs.apify.com/api/v2#/reference/request-queues/queue-head/get-head
Parameters
keyword-onlylimit: int | None = None
How many requests to retrieve
Returns dict
The desired number of requests from the beginning of the queue.
list_requests
List requests in the queue.
https://docs.apify.com/api/v2#/reference/request-queues/request-collection/list-requests
Parameters
keyword-onlylimit: int | None = None
How many requests to retrieve
keyword-onlyexclusive_start_id: str | None = None
All requests up to this one (including) are skipped from the result
Returns dict
prolong_request_lock
Prolong the lock on a request.
https://docs.apify.com/api/v2#/reference/request-queues/request-lock/prolong-request-lock
Parameters
request_id: str
ID of the request to prolong the lock
keyword-onlyforefront: bool | None = None
Whether to put the request in the beginning or the end of the queue after lock expires
keyword-onlylock_secs: int
By how much to prolong the lock, in seconds
Returns dict
update
Update the request queue with specified fields.
https://docs.apify.com/api/v2#/reference/request-queues/queue/update-request-queue
Parameters
keyword-onlyname: str | None = None
The new name for the request queue
Returns dict
The updated request queue
update_request
Update a request in the queue.
https://docs.apify.com/api/v2#/reference/request-queues/request/update-request
Parameters
request: dict
The updated request
keyword-onlyforefront: bool | None = None
Whether to put the updated request in the beginning or the end of the queue
Returns dict
The updated request
Async sub-client for manipulating a single request queue.