astronomer.providers.amazon.aws.sensors.batch

Module Contents

Classes

BatchSensorAsync

Given a job ID of a Batch Job, poll for the job status asynchronously until it

class astronomer.providers.amazon.aws.sensors.batch.BatchSensorAsync(*, poll_interval=5, **kwargs)[source]

Bases: airflow.providers.amazon.aws.sensors.batch.BatchSensor

Given a job ID of a Batch Job, poll for the job status asynchronously until it reaches a failure or a success state. If the job fails, the task will fail.

Parameters:
  • job_id – Batch job_id to check the state for

  • aws_conn_id – aws connection to use, defaults to ‘aws_default’

  • region_name – region name to use in AWS Hook Override the region_name in connection (if provided)

  • poll_interval (float) – polling period in seconds to check for the status of the job

execute(context)[source]

Defers trigger class to poll for state of the job run until it reaches a failure or a success state

execute_complete(context, event)[source]

Callback for when the trigger fires - returns immediately. Relies on trigger to throw an exception, otherwise it assumes execution was successful.