File tree Expand file tree Collapse file tree
src/dstack/_internal/server/background/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ async def process_fleets():
5555 < get_current_datetime () - MIN_PROCESSING_INTERVAL ,
5656 )
5757 .options (
58- load_only (FleetModel .id ),
58+ load_only (FleetModel .id , FleetModel . name ),
5959 joinedload (FleetModel .instances ).load_only (InstanceModel .id ),
6060 )
6161 .order_by (FleetModel .last_processed_at .asc ())
@@ -187,8 +187,6 @@ def _maintain_fleet_nodes_in_min_max_range(
187187 # Delete terminated but not deleted instances since
188188 # they are going to be replaced with new pending instances.
189189 if instance .status == InstanceStatus .TERMINATED and not instance .deleted :
190- # It's safe to modify instances without instance lock since
191- # no other task modifies already terminated instances.
192190 instance .deleted = True
193191 instance .deleted_at = get_current_datetime ()
194192 active_instances = [i for i in fleet_model .instances if not i .deleted ]
You can’t perform that action at this time.
0 commit comments