ApifyClient.API.Actors.Runs.Last.RequestQueue.Requests.Lock (apify_client v1.0.0)

Copy Markdown View Source

Provides API endpoints related to api/actors/runs/last/request queue/requests/lock

Summary

Functions

Delete lock on request in the default request queue of an Actor's last run

Prolong lock on request in the default request queue of an Actor's last run

Functions

delete(actor_id, request_id, opts \\ [])

@spec delete(actor_id :: String.t(), request_id :: String.t(), opts :: keyword()) ::
  :ok | {:error, ApifyClient.Error.t()}

Delete lock on request in the default request queue of an Actor's last run

Deletes a request lock in the default request queue of the last Actor run.

This endpoint is a shortcut for getting the last run's defaultRequestQueueId and then using the Delete lock on request in request queue endpoint.

Options

  • status: Filter for the run status.

  • origin: Filter for the run origin, i.e. the means by which the run was started.

  • client_key: A unique identifier of the client accessing the request queue. It must be a string between 1 and 32 characters long. This identifier is used to determine whether the queue was accessed by multiple clients. If clientKey is not provided, the system considers this API call to come from a new client. For details, see the hadMultipleClients field returned by the Get request queue head endpoint.

  • forefront: Determines if request should be added to the head of the queue or to the end after lock was removed.

update(actor_id, request_id, opts \\ [])

@spec update(actor_id :: String.t(), request_id :: String.t(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.RequestLockInfo.t()}
  | {:error, ApifyClient.Error.t()}

Prolong lock on request in the default request queue of an Actor's last run

Prolongs a request lock in the default request queue of the last Actor run.

This endpoint is a shortcut for getting the last run's defaultRequestQueueId and then using the Prolong lock on request in request queue endpoint.

Options

  • status: Filter for the run status.

  • origin: Filter for the run origin, i.e. the means by which the run was started.

  • lock_secs: How long the requests will be locked for (in seconds).

  • client_key: A unique identifier of the client accessing the request queue. It must be a string between 1 and 32 characters long. This identifier is used to determine whether the queue was accessed by multiple clients. If clientKey is not provided, the system considers this API call to come from a new client. For details, see the hadMultipleClients field returned by the Get request queue head endpoint.

  • forefront: Determines if request should be added to the head of the queue or to the end after lock expires.