Skip to content

Commit

Permalink
[JENKINS-2180] Always use earlier scheduling date.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Apr 21, 2015
1 parent 86bf6b7 commit 1072f5c
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions core/src/main/java/hudson/model/Queue.java
Expand Up @@ -648,17 +648,9 @@ public WaitingItem schedule(Task p, int quietPeriod, List<Action> actions) {

boolean queueUpdated = false;
for (WaitingItem wi : Util.filter(duplicatesInQueue, WaitingItem.class)) {
if (quietPeriod <= 0) {
// the user really wants to build now, and they mean NOW.
// so let's pull in the timestamp if we can.
if (wi.timestamp.before(due))
continue;
} else {
// otherwise we do the normal quiet period implementation
if (wi.timestamp.after(due))
continue;
// quiet period timer reset. start the period over again
}
// make sure to always use the shorter of the available due times
if (wi.timestamp.before(due))
continue;

// waitingList is sorted, so when we change a timestamp we need to maintain order
wi.leave(this);
Expand Down

0 comments on commit 1072f5c

Please sign in to comment.