Skip to content

Commit

Permalink
🐛 preempted-postpone even when preemption disabled. (#738) (#739)
Browse files Browse the repository at this point in the history
When a task is preempted, it needs to be postponed for a short duration
to prevent thrashing. Since individual tasks may override the _global_
preempt policy, the postpone must happen regardless.

Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>

Signed-off-by: Jeff Ortel <jortel@redhat.com>
Signed-off-by: Cherry Picker <noreply@github.com>
Co-authored-by: Jeff Ortel <jortel@redhat.com>
  • Loading branch information
konveyor-ci-bot[bot] and jortel authored Aug 5, 2024
1 parent 15b11a8 commit 5b96d13
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions task/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ type RulePreempted struct {
// Postpone based on a duration after the last preempted event.
func (r *RulePreempted) Match(ready, _ *Task) (matched bool, reason string) {
preemption := Settings.Hub.Task.Preemption
if !preemption.Enabled {
return
}
mark := time.Now()
event, found := ready.LastEvent(Preempted)
if found {
Expand Down

0 comments on commit 5b96d13

Please sign in to comment.