Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Oct 16, 2024
1 parent 462fe38 commit 866757a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1217,10 +1217,13 @@ async def auto_scale_cluster(
If there are such tasks, this method will allocate new machines in AWS to cope with
the additional load.
"""
# current state
allowed_instance_types = await _sorted_allowed_instance_types(app)
cluster = await _analyze_current_cluster(
app, auto_scaling_mode, allowed_instance_types
)

# cleanup
cluster = await _cleanup_disconnected_nodes(app, cluster)
cluster = await _terminate_broken_ec2s(app, cluster)
cluster = await _make_pending_buffer_ec2s_join_cluster(app, cluster)
Expand All @@ -1229,8 +1232,11 @@ async def auto_scale_cluster(
)
cluster = await _drain_retired_nodes(app, cluster)

# desired state
cluster = await _autoscale_cluster(
app, cluster, auto_scaling_mode, allowed_instance_types
)

# notify
await _notify_machine_creation_progress(app, cluster, auto_scaling_mode)
await _notify_autoscaling_status(app, cluster, auto_scaling_mode)

0 comments on commit 866757a

Please sign in to comment.