Skip to content

Commit

Permalink
sleep does not allow the instances to be killed
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinefalisse committed Jun 7, 2024
1 parent 7ebf76d commit d631b11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
logging.info("Removing scale-in protection (out loop).")
unprotect_current_instance()
logging.info("Removed scale-in protection (out loop).")
time.sleep(3600)
for i in range(3600):
time.sleep(1)

# workerType = 'calibration' -> just processes calibration and neutral
# workerType = 'all' -> processes all types of trials
Expand Down Expand Up @@ -84,7 +85,8 @@
logging.info("Removing scale-in protection (in loop).")
unprotect_current_instance()
logging.info("Removed scale-in protection (in loop).")
time.sleep(3600)
for i in range(3600):
time.sleep(1)
else:
t_lastTrial = time.localtime()

Expand Down
2 changes: 0 additions & 2 deletions utilsAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ def getASInstance():
except Exception as e:
logging.error(f"Error occurred while checking ECS_CONTAINER_METADATA_FILE: {e}")
return False
# Temp
# return True

def get_metric_average(namespace, metric_name, start_time, end_time, period):
"""
Expand Down

0 comments on commit d631b11

Please sign in to comment.