ApifyRequestQueueSharedClient
Index
Methods
__init__
Initialize a new shared request queue client instance.
Use
ApifyRequestQueueClient.open(access='shared')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.
keyword-onlymetadata_getter: Callable[[], Coroutine[Any, Any, ApifyRequestQueueMetadata]]
Async function to fetch current metadata from the API.
Returns None
add_batch_of_requests
Specific implementation of this method for the RQ shared access mode.
Parameters
requests: Sequence[Request]
optionalkeyword-onlyforefront: bool = False
Returns AddRequestsResponse
fetch_next_request
Specific implementation of this method for the RQ shared access mode.
Returns Request | None
get_request
Specific implementation of this method for the RQ shared access mode.
Parameters
unique_key: str
Returns Request | None
is_empty
Specific implementation of this method for the RQ shared access mode.
Returns bool
mark_request_as_handled
Specific implementation of this method for the RQ shared access mode.
Parameters
request: Request
Returns ProcessedRequest | None
reclaim_request
Specific implementation of this method for the RQ shared access mode.
Parameters
request: Request
optionalkeyword-onlyforefront: bool = False
Returns ProcessedRequest | None
Internal request queue client implementation for multi-consumer scenarios on the Apify platform.
This implementation is optimized for scenarios where multiple clients concurrently fetch and process requests from the same queue. It makes more frequent API calls to ensure consistency across all consumers and uses request locking to prevent duplicate processing.
This class is used internally by
ApifyRequestQueueClientwhenaccess='shared'is specified.Public methods are not individually documented as they implement the interface defined in
RequestQueueClient.