airflow.providers.amazon.aws.utils.waiter

Module Contents

Functions

waiter(get_state_callable, get_state_args, ...[, ...])

Will call get_state_callable until it reaches the desired_state or the failure_states.

get_state(response, keys)

Attributes

log

airflow.providers.amazon.aws.utils.waiter.log[source]
airflow.providers.amazon.aws.utils.waiter.waiter(get_state_callable, get_state_args, parse_response, desired_state, failure_states, object_type, action, countdown=25 * 60, check_interval_seconds=60)[source]

Will call get_state_callable until it reaches the desired_state or the failure_states. It will also time out if it waits longer than countdown seconds.

Parameters
  • get_state_callable (Callable) – A callable to run until it returns True

  • get_state_args (dict) – Arguments to pass to get_state_callable

  • parse_response (list) – Dictionary keys to extract state from response of get_state_callable

  • desired_state (set) – Wait until the getter returns this value

  • failure_states (set) – A set of states which indicate failure and should throw an exception if any are reached before the desired_state

  • object_type (str) – Used for the reporting string. What are you waiting for? (application, job, etc)

  • action (str) – Used for the reporting string. What action are you waiting for? (created, deleted, etc)

  • countdown (int) – Total amount of time the waiter should wait for the desired state before timing out (in seconds). Defaults to 25 * 60 seconds.

  • check_interval_seconds (int) – Number of seconds waiter should wait before attempting to retry get_state_callable. Defaults to 60 seconds.

airflow.providers.amazon.aws.utils.waiter.get_state(response, keys)[source]

Was this entry helpful?