Skip to content

Commit

Permalink
Mark jobs deleted through job context as inactive. (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
jankaspar committed Jun 8, 2021
1 parent 42bdcf0 commit a06961f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/executor/job_context/job_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ func (c *ClusterJobContext) GetRunningJobs() ([]*RunningJob, error) {
}

func (c *ClusterJobContext) DeleteJobs(jobs []*RunningJob) {
c.activeJobIdsMutex.Lock()
defer c.activeJobIdsMutex.Unlock()

for _, job := range jobs {
delete(c.activeJobIds, job.JobId)
c.clusterContext.DeletePods(job.Pods)
}
}
Expand Down

0 comments on commit a06961f

Please sign in to comment.