Skip to content

Commit

Permalink
optionally set base_rpu
Browse files Browse the repository at this point in the history
  • Loading branch information
jiezhen-chen committed Apr 18, 2024
1 parent 7a1a1ee commit 371a92e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def cluster_dict(endpoint, is_serverless=False, start_time=None, end_time=None):
response = aws_service_helper.redshift_get_serverless_workgroup(
workgroup_name, cluster.get("region")
)

cluster["num_nodes"] = "N/A"
cluster["instance"] = "Serverless"
cluster["base_rpu"] = response["workgroup"]["baseCapacity"]
if response.get("workgroup").get("baseCapacity"):
cluster["base_rpu"] = response.get("workgroup").get("baseCapacity")
except Exception as e:
if e.response["Error"]["Code"] == "ResourceNotFoundException":
logger.warning(
Expand Down

0 comments on commit 371a92e

Please sign in to comment.