package org.sonar.server.ce.ws;
import com.google.common.base.Optional;
+import org.sonar.api.server.ws.Change;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
import org.sonar.api.server.ws.WebService;
action.createParam(PARAM_COMPONENT_KEY)
.setDescription("Key of the component (project) to filter on")
.setExampleValue(KeyExamples.KEY_PROJECT_EXAMPLE_001);
+
+ action.setChangelog(new Change("6.6", "New field 'inProgress' in response"));
}
@Override
String componentUuid = component.isPresent() ? component.get().uuid() : null;
checkPermissions(component);
int pendingCount = dbClient.ceQueueDao().countByStatusAndComponentUuid(dbSession, CeQueueDto.Status.PENDING, componentUuid);
+ int inProgressCount = dbClient.ceQueueDao().countByStatusAndComponentUuid(dbSession, CeQueueDto.Status.IN_PROGRESS, componentUuid);
int failingCount = dbClient.ceActivityDao().countLastByStatusAndComponentUuid(dbSession, CeActivityDto.Status.FAILED, componentUuid);
return ActivityStatusWsResponse.newBuilder()
.setPending(pendingCount)
+ .setInProgress(inProgressCount)
.setFailing(failingCount)
.build();
}
public void json_example() {
dbClient.ceQueueDao().insert(dbSession, newCeQueueDto("ce-queue-uuid-1").setStatus(CeQueueDto.Status.PENDING));
dbClient.ceQueueDao().insert(dbSession, newCeQueueDto("ce-queue-uuid-2").setStatus(CeQueueDto.Status.PENDING));
+ dbClient.ceQueueDao().insert(dbSession, newCeQueueDto("ce-queue-uuid-3").setStatus(CeQueueDto.Status.IN_PROGRESS));
for (int i = 0; i < 5; i++) {
dbClient.ceActivityDao().insert(dbSession, new CeActivityDto(newCeQueueDto("ce-activity-uuid-" + i))
.setStatus(CeActivityDto.Status.FAILED));
#********************************************************************
wrapper.disable_restarts=TRUE
wrapper.ping.timeout=0
-wrapper.shutdown.timeout=3000
-wrapper.jvm_exit.timeout=3000
+wrapper.shutdown.timeout=300
+wrapper.jvm_exit.timeout=15