airflow.providers.amazon.aws.executors.ecs.utils
¶
AWS ECS Executor Utilities.
Data classes and utility functions used by the ECS executor.
Module Contents¶
Classes¶
Represents an ECS task that is queued. The task will be run in the next heartbeat. |
|
Contains information about a currently running ECS task. |
|
Base Implementation of the Config Keys class. Implements iteration for child classes to inherit. |
|
Keys loaded into the config which are valid ECS run_task kwargs. |
|
All keys loaded into the config which are related to the ECS Executor. |
|
Data Transfer Object for an ECS Fargate Task. |
|
A five-way dictionary between Airflow task ids, Airflow cmds, ECS ARNs, and ECS task objects. |
Functions¶
|
Convert "assign_public_ip" from True/False to ENABLE/DISABLE. |
|
Accept a potentially nested dictionary and recursively convert all keys into camelCase. |
Attributes¶
- class airflow.providers.amazon.aws.executors.ecs.utils.EcsQueuedTask[source]¶
Represents an ECS task that is queued. The task will be run in the next heartbeat.
- next_attempt_time: datetime.datetime[source]¶
- class airflow.providers.amazon.aws.executors.ecs.utils.EcsTaskInfo[source]¶
Contains information about a currently running ECS task.
- class airflow.providers.amazon.aws.executors.ecs.utils.BaseConfigKeys[source]¶
Base Implementation of the Config Keys class. Implements iteration for child classes to inherit.
- class airflow.providers.amazon.aws.executors.ecs.utils.RunTaskKwargsConfigKeys[source]¶
Bases:
BaseConfigKeys
Keys loaded into the config which are valid ECS run_task kwargs.
- class airflow.providers.amazon.aws.executors.ecs.utils.AllEcsConfigKeys[source]¶
Bases:
RunTaskKwargsConfigKeys
All keys loaded into the config which are related to the ECS Executor.
- exception airflow.providers.amazon.aws.executors.ecs.utils.EcsExecutorException[source]¶
Bases:
Exception
Thrown when something unexpected has occurred within the ECS ecosystem.
- class airflow.providers.amazon.aws.executors.ecs.utils.EcsExecutorTask(task_arn, last_status, desired_status, containers, started_at=None, stopped_reason=None)[source]¶
Data Transfer Object for an ECS Fargate Task.
- get_task_state()[source]¶
Determine the state of an ECS task based on its status and other relevant attributes.
- It can return one of the following statuses:
QUEUED - Task is being provisioned. RUNNING - Task is launched on ECS. REMOVED - Task provisioning has failed for some reason. See stopped_reason. FAILED - Task is completed and at least one container has failed. SUCCESS - Task is completed and all containers have succeeded.
- class airflow.providers.amazon.aws.executors.ecs.utils.EcsTaskCollection[source]¶
A five-way dictionary between Airflow task ids, Airflow cmds, ECS ARNs, and ECS task objects.
- add_task(task, airflow_task_key, queue, airflow_cmd, exec_config, attempt_number)[source]¶
Add a task to the collection.