Skip to main content
Version: 2.5

RunClientAsync

Async sub-client for manipulating a single Actor run.

Index

Methods

abort

  • async abort(*, gracefully): dict

charge

  • async charge(event_name, count, idempotency_key): None

dataset

delete

  • async delete(): None

get

  • async get(): dict | None

get_status_message_watcher

  • Get StatusMessageWatcher instance that can be used to redirect status and status messages to logs.

    StatusMessageWatcher can be explicitly started and stopped or used as a context manager.


    Parameters

    • to_logger: logging.Logger | None = None
    • check_period: timedelta = timedelta(seconds=1)

    Returns StatusMessageWatcherAsync

get_streamed_log

  • Get StreamedLog instance that can be used to redirect logs.

    StreamedLog can be explicitly started and stopped or used as a context manager.


    Parameters

    • to_logger: logging.Logger | None = None
    • keyword-onlyfrom_start: bool = True

    Returns StreamedLogAsync

key_value_store

log

metamorph

  • async metamorph(*, target_actor_id, target_actor_build, run_input, content_type): dict

reboot

  • async reboot(): dict

request_queue

resurrect

  • async resurrect(*, build, memory_mbytes, timeout_secs, max_items, max_total_charge_usd, restart_on_error): dict
  • Resurrect a finished Actor run.

    Only finished runs, i.e. runs with status FINISHED, FAILED, ABORTED and TIMED-OUT can be resurrected. Run status will be updated to RUNNING and its container will be restarted with the same default storages.

    https://docs.apify.com/api/v2#/reference/actor-runs/resurrect-run/resurrect-run


    Parameters

    • keyword-onlybuild: str | None = None
    • keyword-onlymemory_mbytes: int | None = None
    • keyword-onlytimeout_secs: int | None = None
    • keyword-onlymax_items: int | None = None
    • keyword-onlymax_total_charge_usd: Decimal | None = None
    • keyword-onlyrestart_on_error: bool | None = None

    Returns dict

update

  • async update(*, status_message, is_status_message_terminal, general_access): dict

wait_for_finish

  • async wait_for_finish(*, wait_secs): dict | None
  • Wait synchronously until the run finishes or the server times out.


    Parameters

    • keyword-onlywait_secs: int | None = None

    Returns dict | None