Skip to content

Commit

Permalink
ensure stopping works
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Sep 19, 2023
1 parent dcbb5cf commit 6a43354
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,11 @@ async def _schedule_tasks_to_stop(
comp_tasks_repo = CompTasksRepository.instance(self.db_engine)
await comp_tasks_repo.mark_project_published_tasks_as_aborted(project_id)
# stop any remaining running task, these are already submitted
tasks_to_stop = [t for t in comp_tasks.values() if t.state in PROCESSING_STATES]
tasks_to_stop = [
t
for t in comp_tasks.values()
if t.state in PROCESSING_STATES | {RunningState.WAITING_FOR_CLUSTER}
]
await self._stop_tasks(user_id, tasks_to_stop, pipeline_params)

async def _schedule_tasks_to_start(
Expand Down

0 comments on commit 6a43354

Please sign in to comment.