RunClient
Hierarchy
- ActorJobBaseClient
- RunClient
Index
Methods
__init__
Initialize the RunClient.
Parameters
args: Any
kwargs: Any
Returns None
abort
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 the client for the default dataset of the actor run.
https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
Returns DatasetClient
DatasetClient: A client allowing access to the default dataset of this actor run.
get
Return information about the actor run.
https://docs.apify.com/api/v2#/reference/actor-runs/run-object/get-run
Returns Optional[Dict]
dict: The retrieved actor run data
key_value_store
Get the client for the default key-value store of the actor run.
https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
Returns KeyValueStoreClient
KeyValueStoreClient: A client allowing access to the default key-value store of this actor run.
log
Get the client for the log of the actor run.
https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
Returns LogClient
LogClient: A client allowing access to the log of this actor run.
metamorph
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
Get the client for the default request queue of the actor run.
https://docs.apify.com/api/v2#/reference/actors/last-run-object-and-its-storages
Returns RequestQueueClient
RequestQueueClient: A client allowing access to the default request_queue of this actor run.
resurrect
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
Returns Dict
dict: The actor run data.
wait_for_finish
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.
Sub-client for manipulating a single actor run.