potiuk commented on code in PR #30226:
URL: https://github.com/apache/airflow/pull/30226#discussion_r1148061095
##########
airflow/providers/amazon/aws/triggers/redshift_cluster.py:
##########
@@ -70,6 +70,16 @@ async def run(self) -> AsyncIterator["TriggerEvent"]:
else:
if self.attempts < 1:
yield TriggerEvent({"status": "error", "message":
f"{self.task_id} failed"})
+ elif self.operation_type == "resume_cluster":
+ response = await hook.resume_cluster(
+ cluster_identifier=self.cluster_identifier,
+ polling_period_seconds=self.poll_interval,
+ )
+ if response.get("status") == "success":
+ yield TriggerEvent(response)
+ else:
+ if self.attempts < 1:
+ yield TriggerEvent({"status": "error", "message":
f"{self.task_id} failed"})
Review Comment:
Absolutely ! @o-nikolas - I've been looking at it before our provider's
releases and I hope @eladkal did too.
BTW. Today I was using it as an example for the Databricks team that is
looking to build similar dashboard for databricks provider (cc: @alexott ) - I
think there might be a learning or two to share between your teams :)
--
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]