Skip to content

Commit

Permalink
Set EcsRunTaskOperator default waiter duration to 70 days (#34928)
Browse files Browse the repository at this point in the history
  • Loading branch information
123MwanjeMike committed Oct 16, 2023
1 parent b119646 commit b392f66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/amazon/aws/operators/ecs.py
Expand Up @@ -475,8 +475,8 @@ def __init__(
number_logs_exception: int = 10,
wait_for_completion: bool = True,
waiter_delay: int = 6,
waiter_max_attempts: int = 1000000 * 365 * 24 * 60 * 10,
# Set the default waiter duration to 1M years (attempts*delay)
waiter_max_attempts: int = 1000000,
# Set the default waiter duration to 70 days (attempts*delay)
# Airflow execution_timeout handles task timeout
deferrable: bool = conf.getboolean("operators", "default_deferrable", fallback=False),
**kwargs,
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/amazon/aws/operators/test_ecs.py
Expand Up @@ -347,7 +347,7 @@ def test_wait_end_tasks(self, client_mock):
self.ecs._wait_for_task_ended()
client_mock.get_waiter.assert_called_once_with("tasks_stopped")
client_mock.get_waiter.return_value.wait.assert_called_once_with(
cluster="c", tasks=["arn"], WaiterConfig={"Delay": 6, "MaxAttempts": 1000000 * 365 * 24 * 60 * 10}
cluster="c", tasks=["arn"], WaiterConfig={"Delay": 6, "MaxAttempts": 1000000}
)

@mock.patch.object(EcsBaseOperator, "client")
Expand Down

0 comments on commit b392f66

Please sign in to comment.