Skip to content

Commit

Permalink
Merge pull request #281 from k82cn/rm_del
Browse files Browse the repository at this point in the history
Removed delete action in addTask.
  • Loading branch information
k82cn authored Jul 7, 2018
2 parents d166daa + 863096f commit 665e798
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/scheduler/cache/event_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ func (sc *SchedulerCache) addTask(pi *arbapi.TaskInfo) error {
sc.Jobs[pi.Job] = arbapi.NewJobInfo(pi.Job)
}

// TODO(k82cn): it's found that the Add event will be sent
// multiple times without update/delete. That should be a
// client-go issue, we need to dig deeper for that.
sc.Jobs[pi.Job].DeleteTaskInfo(pi)
sc.Jobs[pi.Job].AddTaskInfo(pi)
}

Expand All @@ -55,8 +51,6 @@ func (sc *SchedulerCache) addTask(pi *arbapi.TaskInfo) error {
}

node := sc.Nodes[pi.NodeName]
node.RemoveTask(pi)

if !isTerminated(pi.Status) {
return node.AddTask(pi)
}
Expand Down

0 comments on commit 665e798

Please sign in to comment.