Skip to main content
Version: 0.6

RunClient

Sub-client for manipulating a single actor run.

Hierarchy

Index

Methods

__init__

  • __init__(args, kwargs): None

abort

  • abort(*, gracefully): Dict
  • Abort the actor run which is starting or currently running and return its details.

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


    Parameters

    • optionalkeyword-onlygracefully: Optional[bool] = None

      If True, the actor run will abort gracefully. It will send `aborting` and `persistStates` events into the run and force-stop the run after 30 seconds. It is helpful in cases where you plan to resurrect the run later.

    Returns Dict

    dict: The data of the aborted actor run

dataset

get

  • get(): Optional[Dict]

key_value_store

log

metamorph

  • metamorph(*, target_actor_id, target_actor_build, run_input, content_type): Dict
  • Transform an actor run into a run of another actor with a new input.

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


    Parameters

    • keyword-onlytarget_actor_id: str

      ID of the target actor that the run should be transformed into

    • optionalkeyword-onlytarget_actor_build: Optional[str] = None

      The build of the target actor. It can be either a build tag or build number. By default, the run uses the build specified in the default run configuration for the target actor (typically the latest build).

    • optionalkeyword-onlyrun_input: Optional[Any] = None

      The input to pass to the new run.

    • optionalkeyword-onlycontent_type: Optional[str] = None

      The content type of the input.

    Returns Dict

    dict: The actor run data.

request_queue

resurrect

  • resurrect(): Dict

wait_for_finish

  • wait_for_finish(*, wait_secs): Optional[Dict]
  • Wait synchronously until the run finishes or the server times out.


    Parameters

    • optionalkeyword-onlywait_secs: Optional[int] = None

      how long does the client wait for run to finish. None for indefinite.

    Returns Optional[Dict]

    dict, optional: The actor run data. If the status on the object is not one of the terminal statuses (SUCCEEDED, FAILED, TIMED_OUT, ABORTED), then the run has not yet finished.