Skip to main content

TaskClientAsync

Async sub-client for manipulating a single task.

Index

Methods

call

  • async call(*, task_input, build, max_items, memory_mbytes, timeout_secs, webhooks, wait_secs): dict | None
  • Start a task and wait for it to finish before returning the Run object.

    It waits indefinitely, unless the wait_secs argument is provided.

    https://docs.apify.com/api/v2#/reference/actor-tasks/run-collection/run-task


    Parameters

    • keyword-onlytask_input: dict | None = None
    • keyword-onlybuild: str | None = None
    • keyword-onlymax_items: int | None = None
    • keyword-onlymemory_mbytes: int | None = None
    • keyword-onlytimeout_secs: int | None = None
    • keyword-onlywebhooks: list[dict] | None = None
    • keyword-onlywait_secs: int | None = None

    Returns dict | None

delete

  • async delete(): None

get

  • async get(): dict | None

get_input

  • async get_input(): dict | None

last_run

  • Retrieve the client for the last run of this task.

    Last run is retrieved based on the start time of the runs.


    Parameters

    • keyword-onlystatus: ActorJobStatus | None = None
    • keyword-onlyorigin: MetaOrigin | None = None

    Returns RunClientAsync

runs

start

  • async start(*, task_input, build, max_items, memory_mbytes, timeout_secs, wait_for_finish, webhooks): dict
  • Start the task and immediately return the Run object.

    https://docs.apify.com/api/v2#/reference/actor-tasks/run-collection/run-task


    Parameters

    • keyword-onlytask_input: dict | None = None
    • keyword-onlybuild: str | None = None
    • keyword-onlymax_items: int | None = None
    • keyword-onlymemory_mbytes: int | None = None
    • keyword-onlytimeout_secs: int | None = None
    • keyword-onlywait_for_finish: int | None = None
    • keyword-onlywebhooks: list[dict] | None = None

    Returns dict

update

  • async update(*, name, task_input, build, max_items, memory_mbytes, timeout_secs, title, actor_standby_desired_requests_per_actor_run, actor_standby_max_requests_per_actor_run, actor_standby_idle_timeout_secs, actor_standby_build, actor_standby_memory_mbytes): dict

  • Parameters

    • keyword-onlyname: str | None = None
    • keyword-onlytask_input: dict | None = None
    • keyword-onlybuild: str | None = None
    • keyword-onlymax_items: int | None = None
    • keyword-onlymemory_mbytes: int | None = None
    • keyword-onlytimeout_secs: int | None = None
    • keyword-onlytitle: str | None = None
    • keyword-onlyactor_standby_desired_requests_per_actor_run: int | None = None
    • keyword-onlyactor_standby_max_requests_per_actor_run: int | None = None
    • keyword-onlyactor_standby_idle_timeout_secs: int | None = None
    • keyword-onlyactor_standby_build: str | None = None
    • keyword-onlyactor_standby_memory_mbytes: int | None = None

    Returns dict

update_input

  • async update_input(*, task_input): dict

webhooks