Skip to content

Commit

Permalink
Handle already resumed Redshift
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffxy committed Dec 18, 2023
1 parent c6f7d26 commit de68108
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/brad/provisioning/redshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ async def resume_and_fetch_existing_provisioning(
self, cluster_id: str
) -> Provisioning:
def do_resume():
self._redshift.resume_cluster(ClusterIdentifier=cluster_id)
try:
self._redshift.resume_cluster(ClusterIdentifier=cluster_id)
except Exception as ex:
message = repr(ex)
if "InvalidClusterState" in message:
logger.info("Proceeding past Redshift resume error: %s", message)
else:
raise

loop = asyncio.get_running_loop()
await loop.run_in_executor(None, do_resume)
Expand Down

0 comments on commit de68108

Please sign in to comment.