pendant.aws.batch module¶
-
class
pendant.aws.batch.
JobDefinition
[source]¶ Bases:
object
A Batch job definition.
-
name
¶ Return the name of the job definition.
-
parameters
¶ Return the parameters of the job definition.
-
revision
¶ Return the revision of the job definition.
-
at_revision
(revision: str) → pendant.aws.batch.JobDefinition[source]¶ Set this job definition to a specific revision.
-
-
class
pendant.aws.batch.
BatchJob
(definition: pendant.aws.batch.JobDefinition)[source]¶ Bases:
object
An AWS Batch job.
A Batch job can be instantiated and then submitted against the Batch service. After submission, the job’s status can be queried, the job’s logs can be read, and other methods can be called to understand the state of the job.
Parameters: definition – A Batch job definition. -
container_overrides
¶ Return container overriding parameters.
-
job_id
¶ Return the job ID.
-
queue
¶ Return the job queue.
-
cancel
(reason: str) → Dict[source]¶ Cancel this job.
Parameters: reason – The reason why the job must be canceled. Returns: The service response to job cancellation.
-
terminate
(reason: str) → Dict[source]¶ Terminate this job.
Jobs that are in the STARTING or RUNNING state are terminated, which causes them to transition to FAILED. Jobs that have not progressed to the STARTING state are cancelled.
Parameters: reason – The reason why the job must be terminated. Returns: The service response to job termination.
-
submit
(queue: str, container_overrides: Optional[Mapping] = None) → pendant.aws.response.SubmitJobResponse[source]¶ Submit this job to Batch.
Parameters: - queue – The Batch job queue to use.
- container_overrides – The values to override in the spawned container.
Returns: The service response to job submission.
-