use of org.jboss.pnc.dto.response.RunningBuildCount in project pnc by project-ncl.
the class BuildProviderImpl method getRunningCount.
@Override
public RunningBuildCount getRunningCount() {
List<BuildTask> x = buildCoordinator.getSubmittedBuildTasks();
int waitingForDependencies = 0;
int running = 0;
int enqueued = 0;
for (BuildTask task : x) {
switch(task.getStatus()) {
case ENQUEUED:
enqueued++;
continue;
case BUILDING:
running++;
continue;
case WAITING_FOR_DEPENDENCIES:
waitingForDependencies++;
continue;
}
}
return new RunningBuildCount(running, enqueued, waitingForDependencies);
}
Aggregations