We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 236b731 commit 8051e85Copy full SHA for 8051e85
1 file changed
src/dstack/_internal/server/background/tasks/process_fleets.py
@@ -5,7 +5,7 @@
5
6
from sqlalchemy import select, update
7
from sqlalchemy.ext.asyncio import AsyncSession
8
-from sqlalchemy.orm import joinedload, load_only
+from sqlalchemy.orm import joinedload, load_only, selectinload
9
10
from dstack._internal.core.models.fleets import FleetSpec, FleetStatus
11
from dstack._internal.core.models.instances import InstanceStatus
@@ -56,7 +56,7 @@ async def process_fleets():
56
)
57
.options(
58
load_only(FleetModel.id, FleetModel.name),
59
- joinedload(FleetModel.instances).load_only(InstanceModel.id),
+ selectinload(FleetModel.instances).load_only(InstanceModel.id),
60
61
.order_by(FleetModel.last_processed_at.asc())
62
.limit(BATCH_SIZE)
0 commit comments