File tree Expand file tree Collapse file tree 2 files changed +3
-54
lines changed
src/simcore_service_autoscaling/modules Expand file tree Collapse file tree 2 files changed +3
-54
lines changed Original file line number Diff line number Diff line change @@ -333,14 +333,13 @@ async def _sorted_allowed_instance_types(app: FastAPI) -> list[EC2InstanceType]:
333333 assert app_settings .AUTOSCALING_EC2_INSTANCES # nosec
334334 ec2_client = get_ec2_client (app )
335335
336- # some instances might be able to run several tasks
337336 allowed_instance_type_names = list (
338337 app_settings .AUTOSCALING_EC2_INSTANCES .EC2_INSTANCES_ALLOWED_TYPES
339338 )
340339
341- assert (
340+ assert ( # nosec
342341 allowed_instance_type_names
343- ), "EC2_INSTANCES_ALLOWED_TYPES cannot be empty!" # nosec
342+ ), "EC2_INSTANCES_ALLOWED_TYPES cannot be empty!"
344343
345344 allowed_instance_types : list [
346345 EC2InstanceType
@@ -352,6 +351,7 @@ def _as_selection(instance_type: EC2InstanceType) -> int:
352351 # NOTE: will raise ValueError if allowed_instance_types not in allowed_instance_type_names
353352 return allowed_instance_type_names .index (f"{ instance_type .name } " )
354353
354+ # some instances might be able to run several tasks
355355 allowed_instance_types .sort (key = _as_selection )
356356 return allowed_instance_types
357357
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments