airflow.providers.amazon.aws.utils.waiter_with_logging
¶
Module Contents¶
Functions¶
|
Use a boto waiter to poll an AWS service for the specified state. |
|
Use an async boto waiter to poll an AWS service for the specified state. |
- airflow.providers.amazon.aws.utils.waiter_with_logging.wait(waiter, waiter_delay, waiter_max_attempts, args, failure_message, status_message, status_args)[source]¶
Use a boto waiter to poll an AWS service for the specified state.
Although this function uses boto waiters to poll the state of the service, it logs the response of the service after every attempt, which is not currently supported by boto waiters.
- Parameters
waiter (botocore.waiter.Waiter) – The boto waiter to use.
waiter_delay (int) – The amount of time in seconds to wait between attempts.
waiter_max_attempts (int) – The maximum number of attempts to be made.
args (dict[str, Any]) – The arguments to pass to the waiter.
failure_message (str) – The message to log if a failure state is reached.
status_message (str) – The message logged when printing the status of the service.
A list containing the JMESPath queries to retrieve status information from the waiter response. e.g. response = {“Cluster”: {“state”: “CREATING”}} status_args = [“Cluster.state”]
response = { “Clusters”: [{“state”: “CREATING”, “details”: “User initiated.”},] } status_args = [“Clusters[0].state”, “Clusters[0].details”]
- async airflow.providers.amazon.aws.utils.waiter_with_logging.async_wait(waiter, waiter_delay, waiter_max_attempts, args, failure_message, status_message, status_args)[source]¶
Use an async boto waiter to poll an AWS service for the specified state.
Although this function uses boto waiters to poll the state of the service, it logs the response of the service after every attempt, which is not currently supported by boto waiters.
- Parameters
waiter (botocore.waiter.Waiter) – The boto waiter to use.
waiter_delay (int) – The amount of time in seconds to wait between attempts.
waiter_max_attempts (int) – The maximum number of attempts to be made.
args (dict[str, Any]) – The arguments to pass to the waiter.
failure_message (str) – The message to log if a failure state is reached.
status_message (str) – The message logged when printing the status of the service.
A list containing the JMESPath queries to retrieve status information from the waiter response. e.g. response = {“Cluster”: {“state”: “CREATING”}} status_args = [“Cluster.state”]
response = { “Clusters”: [{“state”: “CREATING”, “details”: “User initiated.”},] } status_args = [“Clusters[0].state”, “Clusters[0].details”]