Skip to content

Commit

Permalink
Merge pull request #391 from jglick/isInQueue
Browse files Browse the repository at this point in the history
Override `isInQueue` & `getQueueItem` from `WorkflowJob`
  • Loading branch information
jglick authored Oct 24, 2023
2 parents 8348ead + d778de8 commit c6700e3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,18 @@ public void setQuietPeriod(Integer seconds) throws IOException {
save();
}

@Exported
@Override
public boolean isInQueue() {
return Jenkins.get().getQueue().contains(this);
}

@Exported
@Override
public Queue.Item getQueueItem() {
return Jenkins.get().getQueue().getItem(this);
}

@Override public CauseOfBlockage getCauseOfBlockage() {
if (!isConcurrentBuild() && isLogUpdated()) {
WorkflowRun lastBuild = getLastBuild();
Expand Down

0 comments on commit c6700e3

Please sign in to comment.