Skip to content

Commit 1f47e2b

Browse files
committed
Unassign run from fleet for retrying
1 parent bfe3521 commit 1f47e2b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/dstack/_internal/server/background/tasks/process_runs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,8 @@ async def _process_active_run(session: AsyncSession, run_model: RunModel):
402402

403403
if new_status == RunStatus.PENDING:
404404
run_metrics.increment_pending_runs(run_model.project.name, run_spec.configuration.type)
405+
# Unassign run from fleet so that the new fleet can be chosen when retrying
406+
run_model.fleet = None
405407

406408
run_model.status = new_status
407409
run_model.termination_reason = termination_reason

0 commit comments

Comments
 (0)