Docker¶
Classes for running a Gretel Job as a local container
-
class
gretel_client.projects.docker.
ContainerRun
(job: gretel_client.projects.jobs.Job)¶ Runs a Gretel Job from a local container.
- Parameters
job – Job to run as docker container.
-
graceful_shutdown
()¶ Attempts to gracefully shutdown the container run.
-
is_ok
()¶ Checks to see if the container is ok.
- Raises
ContainerRunError if there is a problem with the container. –
-
start
()¶ Run job via a local container. This method is async and will return after the job has started.
If you wish to block until the container has finished, the
wait
method may be used.
-
wait
(timeout: int = 30)¶ Blocks until a running container has completed. If the container hasn’t started yet, we wait until a
timeout
interval is reached.- Parameters
timeout – The time in seconds to wait for a container to start. If the timeout is reached, the function will return.