syedahsn commented on code in PR #30244:
URL: https://github.com/apache/airflow/pull/30244#discussion_r1178450168
##########
airflow/providers/amazon/aws/operators/redshift_cluster.py:
##########
@@ -642,10 +654,26 @@ def execute(self, context: Context):
time.sleep(self._attempt_interval)
else:
raise
-
+ if self.deferrable:
+ self.defer(
+ timeout=self.execution_timeout,
+ trigger=RedshiftDeleteClusterTrigger(
+ cluster_identifier=self.cluster_identifier,
+ poll_interval=self.poll_interval,
+ max_attempts=self.max_attempts,
+ aws_conn_id=self.aws_conn_id,
+ ),
+ method_name="execute_complete",
+ )
if self.wait_for_completion:
waiter =
self.redshift_hook.get_conn().get_waiter("cluster_deleted")
waiter.wait(
ClusterIdentifier=self.cluster_identifier,
WaiterConfig={"Delay": self.poll_interval, "MaxAttempts": 30},
Review Comment:
`MaxAttempts` should use `self.max_attempts` instead of 30.
Also, have you tested this? I believe the `Delay` parameter can only be `int`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]