RunClientAsync
Index
Methods
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
keyword-onlygracefully: bool | None = 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
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 DatasetClientAsync
A client allowing access to the default dataset of this Actor run.
delete
Returns None
get
Return information about the Actor run.
https://docs.apify.com/api/v2#/reference/actor-runs/run-object/get-run
Returns dict | None
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 KeyValueStoreClientAsync
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 LogClientAsync
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
keyword-onlytarget_actor_build: str | None = 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).
keyword-onlyrun_input: Any = None
The input to pass to the new run.
keyword-onlycontent_type: str | None = None
The content type of the input.
Returns dict
The Actor run data.
reboot
Reboot an Actor run. Only runs that are running, i.e. runs with status RUNNING can be rebooted.
https://docs.apify.com/api/v2#/reference/actor-runs/reboot-run/reboot-run
Returns 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 RequestQueueClientAsync
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
Parameters
keyword-onlybuild: str | None = None
Which Actor build the resurrected run should use. It can be either a build tag or build number. By default, the resurrected run uses the same build as before.
keyword-onlymemory_mbytes: int | None = None
New memory limit for the resurrected run, in megabytes. By default, the resurrected run uses the same memory limit as before.
keyword-onlytimeout_secs: int | None = None
New timeout for the resurrected run, in seconds. By default, the resurrected run uses the same timeout as before.
Returns dict
The Actor run data.
update
Update the run with the specified fields.
https://docs.apify.com/api/v2#/reference/actor-runs/run-object/update-run
Parameters
keyword-onlystatus_message: str | None = None
The new status message for the run
keyword-onlyis_status_message_terminal: bool | None = None
Set this flag to True if this is the final status message of the Actor run.
Returns dict
The updated run
wait_for_finish
Wait synchronously until the run finishes or the server times out.
Parameters
keyword-onlywait_secs: int | None = None
how long does the client wait for run to finish. None for indefinite.
Returns dict | None
The Actor run data. If the status on the object is not one of the terminal statuses (SUCEEDED, FAILED, TIMED_OUT, ABORTED), then the run has not yet finished.
Async sub-client for manipulating a single Actor run.