From 7b26dddc17972fdc1a381388a88241349e9c45ec Mon Sep 17 00:00:00 2001 From: Deepak Chourasia Date: Wed, 9 Oct 2024 10:44:09 +0530 Subject: [PATCH] Avoiding unexplained hibernation --- src/hibernate_clusters_daily.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hibernate_clusters_daily.py b/src/hibernate_clusters_daily.py index 6669bfd..415833d 100644 --- a/src/hibernate_clusters_daily.py +++ b/src/hibernate_clusters_daily.py @@ -162,7 +162,7 @@ def good_time_to_hibernate_cluster(inactive_hours_start:str): inactive_hours_start = datetime.datetime.strptime(inactive_hours_start, '%H:%M:%S') # if the inactive hours start is misconfigured, default to hibernating cluster immediately except ValueError: - return true + return False current_utc_time = datetime.datetime.strptime(datetime.datetime.now(datetime.timezone.utc).strftime('%H:%M:%S'), '%H:%M:%S') day_start_time = datetime.datetime.strptime(day_start_time, '%H:%M:%S') @@ -244,4 +244,4 @@ def main(): if __name__ == '__main__': - main() \ No newline at end of file + main()