Skip to content

Commit b16958e

Browse files
committed
refactor
1 parent 53e932a commit b16958e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

services/autoscaling/src/simcore_service_autoscaling/modules/cluster_scaling/_auto_scaling_core.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -677,28 +677,28 @@ async def _find_needed_instances(
677677
task_required_resources = auto_scaling_mode.get_task_required_resources(
678678
task
679679
)
680-
task_required_ec2_instance = (
681-
await auto_scaling_mode.get_task_defined_instance(app, task)
680+
task_required_ec2 = await auto_scaling_mode.get_task_defined_instance(
681+
app, task
682682
)
683683

684684
# first check if we can assign the task to one of the newly tobe created instances
685685
if _try_assign_task_to_ec2_instance_type(
686686
task,
687687
instances=needed_new_instance_types_for_tasks,
688-
task_required_ec2_instance=task_required_ec2_instance,
688+
task_required_ec2_instance=task_required_ec2,
689689
task_required_resources=task_required_resources,
690690
):
691691
continue
692692

693693
# so we need to find what we can create now
694694
try:
695695
# check if exact instance type is needed first
696-
if task_required_ec2_instance:
696+
if task_required_ec2:
697697
defined_ec2 = find_selected_instance_type_for_task(
698-
task_required_ec2_instance,
698+
task_required_ec2,
699699
available_ec2_types,
700700
task,
701-
auto_scaling_mode.get_task_required_resources(task),
701+
task_required_resources,
702702
)
703703
needed_new_instance_types_for_tasks.append(
704704
AssignedTasksToInstanceType(
@@ -712,7 +712,7 @@ async def _find_needed_instances(
712712
# we go for best fitting type
713713
best_ec2_instance = utils_ec2.find_best_fitting_ec2_instance(
714714
available_ec2_types,
715-
auto_scaling_mode.get_task_required_resources(task),
715+
task_required_resources,
716716
score_type=utils_ec2.closest_instance_policy,
717717
)
718718
needed_new_instance_types_for_tasks.append(

0 commit comments

Comments
 (0)