Skip to content

Commit

Permalink
refining daily hibernation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dchourasia committed Nov 20, 2023
1 parent f073023 commit 1380619
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/hibernate_clusters_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ def main():

if cluster.inactive_hours_start and good_time_to_hibernate_cluster(cluster.inactive_hours_start):
if cluster.hcp == "false":
# hibernate_cluster(cluster)
hibernate_cluster(cluster)
print("OSD or ROSA Classic - ", cluster.name)
else:
# hybernate_hypershift_cluster(cluster, ec2_instances[cluster.region])
hybernate_hypershift_cluster(cluster, ec2_instances[cluster.region])
print("Hypershift cluster - ", cluster.name)
hibernated_clusters.append(cluster.__dict__)

Expand Down
4 changes: 2 additions & 2 deletions src/resume_clusters_daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ def main():
for cluster in clusters:
if cluster.inactive_hours_end and good_time_to_resume_cluster(cluster.inactive_hours_end):
if cluster.hcp == "false":
# resume_cluster(cluster)
resume_cluster(cluster)
print("OSD or ROSA Classic - ", cluster.name)
else:
# resume_hypershift_cluster(cluster, ec2_instances[cluster.region])
resume_hypershift_cluster(cluster, ec2_instances[cluster.region])
print("Hypershift cluster - ", cluster.name)
hibernated_clusters.append(cluster.__dict__)

Expand Down

0 comments on commit 1380619

Please sign in to comment.