Skip to content

Commit

Permalink
Fix deferrable RedshiftClusterSensor (apache#45098)
Browse files Browse the repository at this point in the history
- Previously threw an exception that "'coroutine' object is not subscriptable".  Moving ["Clusters"] to the following line allows the result to parse into a subscriptable object.
  • Loading branch information
ferruzzi authored Dec 19, 2024
1 parent de5fb66 commit b6e3d1c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ def cluster_status(self, cluster_identifier: str) -> str:

async def cluster_status_async(self, cluster_identifier: str) -> str:
async with self.async_conn as client:
response = await client.describe_clusters(ClusterIdentifier=cluster_identifier)["Clusters"]
return response[0]["ClusterStatus"] if response else None
response = await client.describe_clusters(ClusterIdentifier=cluster_identifier)
return response["Clusters"][0]["ClusterStatus"] if response else None

def delete_cluster(
self,
Expand Down

0 comments on commit b6e3d1c

Please sign in to comment.