import org.sonar.db.ce.CeQueueDto;
import org.sonar.server.exceptions.NotFoundException;
import org.sonar.server.user.UserSession;
-import org.sonar.server.ws.WsUtils;
import org.sonarqube.ws.WsCe;
+import static org.sonar.server.ws.WsUtils.writeProtobuf;
+
public class TaskAction implements CeWsAction {
public static final String ACTION = "task";
@Override
public void define(WebService.NewController controller) {
WebService.NewAction action = controller.createAction(ACTION)
- .setDescription("Task information")
+ .setDescription("Give Compute Engine task details such as type, status, duration and associated component.<br />" +
+ "Requires 'Administer System' or 'Execute Analysis' permission.")
.setInternal(true)
.setResponseExample(getClass().getResource("task-example.json"))
.setSince("5.2")
throw new NotFoundException();
}
}
- WsUtils.writeProtobuf(wsTaskResponse.build(), wsRequest, wsResponse);
+ writeProtobuf(wsTaskResponse.build(), wsRequest, wsResponse);
} finally {
dbClient.closeSession(dbSession);