Actor builds: fetch, wait for and abort them.
{:ok, build} = ApifyClient.Actors.build("jane/my-actor", "0.1")
{:ok, build} = ApifyClient.Builds.wait_for_finish(build.id, wait_secs: 600)
ApifyClient.Builds.succeeded?(build)Functions take the connection options described in ApifyClient.Client
(:token, :config, ...) next to their own. For everything else about
builds, see ApifyClient.API.Builds and ApifyClient.API.Actors.Builds.
Summary
Functions
Aborts a build.
Whether the build has reached a terminal status.
Gets a build.
Whether the build finished successfully.
Waits until the build reaches a terminal status (SUCCEEDED, FAILED,
ABORTED, TIMED-OUT) and returns it.
Functions
@spec abort(String.t(), keyword()) :: {:ok, ApifyClient.Schemas.Build.t()} | {:error, ApifyClient.Error.t()}
Aborts a build.
@spec finished?(ApifyClient.Schemas.Build.t()) :: boolean()
Whether the build has reached a terminal status.
@spec get(String.t(), keyword()) :: {:ok, ApifyClient.Schemas.Build.t()} | {:error, ApifyClient.Error.t()}
Gets a build.
Options
:wait_for_finish- seconds (at most 60) the API waits for the build to finish before responding
@spec succeeded?(ApifyClient.Schemas.Build.t()) :: boolean()
Whether the build finished successfully.
@spec wait_for_finish(String.t(), keyword()) :: {:ok, ApifyClient.Schemas.Build.t()} | {:error, ApifyClient.Error.t()}
Waits until the build reaches a terminal status (SUCCEEDED, FAILED,
ABORTED, TIMED-OUT) and returns it.
Options
:wait_secs- stop waiting after this many seconds and return the build as it is then; check it withfinished?/1. Default: wait as long as it takes.:poll_interval_ms- minimum time between two requests, in case the API answers before the build finishes without holding the request (default: 1000)