Skip to main content

RequestQueueClient

Sub-client for manipulating a single request queue.

Hierarchy

Index

Methods

__init__

  • __init__(args, *, client_key, kwargs): None
  • Initialize a new instance.


    Parameters

    • args: Any
    • optionalkeyword-onlyclient_key: str | None = None

      A unique identifier of the client accessing the request queue.

    • kwargs: Any

    Returns None

add_request

  • add_request(request, *, forefront): dict

batch_add_requests

  • batch_add_requests(requests, *, forefront, max_parallel, max_unprocessed_requests_retries, min_delay_between_unprocessed_requests_retries): BatchAddRequestsResult
  • 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]

      List of requests to be added to the queue.

    • optionalkeyword-onlyforefront: bool = False

      Whether to add requests to the front of the queue.

    • optionalkeyword-onlymax_parallel: int = 1

      Specifies the maximum number of parallel tasks for API calls. This is only applicable to the async client. For the sync client, this value must be set to 1, as parallel execution is not supported.

    • optionalkeyword-onlymax_unprocessed_requests_retries: int | None = None

      Deprecated argument. Will be removed in next major release.

    • optionalkeyword-onlymin_delay_between_unprocessed_requests_retries: timedelta | None = None

      Deprecated argument. Will be removed in next major release.

    Returns BatchAddRequestsResult

batch_delete_requests

  • batch_delete_requests(requests): dict

delete

  • delete(): None

delete_request

  • delete_request(request_id): None

delete_request_lock

  • delete_request_lock(request_id, *, forefront): None

get

  • get(): dict | None

get_request

  • get_request(request_id): dict | None

list_and_lock_head

  • list_and_lock_head(*, lock_secs, limit): dict

list_head

  • list_head(*, limit): dict

list_requests

  • list_requests(*, limit, exclusive_start_id): dict

prolong_request_lock

  • prolong_request_lock(request_id, *, forefront, lock_secs): dict

unlock_requests

  • unlock_requests(): dict

update

  • update(*, name, general_access): dict

update_request

  • update_request(request, *, forefront): dict

Properties

http_client

params

params: dict

resource_id

resource_id: str | None

root_client

url

url: str