Skip to content

Commit

Permalink
Merge pull request #145 from cunningham-lab/no-spot
Browse files Browse the repository at this point in the history
Prevent launch of spot instances.
  • Loading branch information
cellistigs authored Jun 20, 2023
2 parents c8d758f + 22dd0b4 commit 1370210
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ncap_iac/protocols/utilsparam/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,9 @@ def launch_new_instances_with_tags_additional(instance_type, ami, logger, number
"Tags": tags}
]

spot_duration = None ## edit: spot no longer available. Default to always using standard instances.
if spot_duration is None:
logger.append(" [Utils] save not available (duration not given or greater than 6 hours). Launching standard instance.")
logger.append(" [Utils] save not available. Launching standard instance.")
logger.write()
response = ec2_client.describe_images(ImageIds = [os.environ["AMI"]])
root = response["Images"][0]["RootDeviceName"]
Expand Down

0 comments on commit 1370210

Please sign in to comment.