o-nikolas commented on code in PR #30226:
URL: https://github.com/apache/airflow/pull/30226#discussion_r1149554738


##########
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:
   > 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 :)
   
   Exciting! Feel free to reach out @alexott if you have any questions or would 
like to brainstorm :smiley: 



-- 
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]

Reply via email to