ApifyRequestQueueSingleClient
Index
Methods
__init__
Initialize a new single-consumer request queue client instance.
Use
ApifyRequestQueueClient.open(access='single')instead of calling this directly.Parameters
keyword-onlyapi_client: RequestQueueClientAsync
The Apify API client for request queue operations.
keyword-onlymetadata: RequestQueueMetadata
Initial metadata for the request queue.
keyword-onlycache_size: int
Maximum number of requests to cache locally.
Returns None
add_batch_of_requests
Specific implementation of this method for the RQ single access mode.
Parameters
requests: Sequence[Request]
optionalkeyword-onlyforefront: bool = False
Returns AddRequestsResponse
fetch_next_request
Specific implementation of this method for the RQ single access mode.
Returns Request | None
get_request
Specific implementation of this method for the RQ single access mode.
Parameters
unique_key: str
Returns Request | None
is_empty
Specific implementation of this method for the RQ single access mode.
Returns bool
mark_request_as_handled
Specific implementation of this method for the RQ single access mode.
Parameters
request: Request
Returns ProcessedRequest | None
reclaim_request
Specific implementation of this method for the RQ single access mode.
Parameters
request: Request
optionalkeyword-onlyforefront: bool = False
Returns ProcessedRequest | None
Internal request queue client implementation for single-consumer scenarios on the Apify platform.
This implementation minimizes API calls and resource usage by leveraging local caching and head estimation. It is designed for scenarios where only one client consumes requests from the queue at a time, though multiple producers may add requests concurrently.
Usage constraints
This client must operate within the following constraints to function correctly:
If these constraints are not met, the client may exhibit unpredictable behavior.
This class is used internally by
ApifyRequestQueueClientwhenaccess='single'is specified.Public methods are not individually documented as they implement the interface defined in
RequestQueueClient.