Skip to content

Commit

Permalink
Cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw committed Aug 27, 2024
1 parent 4766439 commit 954e5ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,12 @@ impl EventAction<QueryStageSchedulerEvent> for QueryStageScheduler {
}
QueryStageSchedulerEvent::JobCancel(job_id) => {
info!("Job {} Cancelled", job_id);
match self.state.task_manager.cancel_job(&job_id).await {
match self
.state
.task_manager
.abort_job(&job_id, "Cancelled".to_owned())
.await
{
Ok((running_tasks, _pending_tasks)) => {
event_sender
.post_event(QueryStageSchedulerEvent::CancelTasks(running_tasks))
Expand Down
5 changes: 0 additions & 5 deletions ballista/scheduler/src/state/task_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,6 @@ impl TaskManager {
Ok(())
}

/// Cancel the job and return a Vec of running tasks need to cancel
pub(crate) async fn cancel_job(&self, job_id: &str) -> Result<(Vec<RunningTaskInfo>, usize)> {
self.abort_job(job_id, "Cancelled".to_owned()).await
}

/// Abort the job and return a Vec of running tasks need to cancel
pub(crate) async fn abort_job(
&self,
Expand Down

0 comments on commit 954e5ac

Please sign in to comment.