Permalink
Browse files

cloudant too_many_requests

  • Loading branch information...
rvennam committed Sep 29, 2017
1 parent 99acc30 commit 3827f1ceb03f90fcbfced80dfc71cc5fcf3ce0ca
@@ -24,6 +24,7 @@
<classpathentry kind="lib" path="dep-jar/jackson-all-1.8.10.jar"/>
<classpathentry kind="lib" path="dep-jar/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="dep-jar/junit-4.11.jar"/>
<classpathentry kind="lib" path="dep-jar/org.ektorp-1.5.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="dep-jar/servlet-api.jar"/>
@@ -0,0 +1 @@
/classes/
Binary file not shown.
@@ -4,8 +4,8 @@
<property environment="env"/>
<property name="srcDir" value="."/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.5"/>
<property name="source" value="1.5"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<property name="ARCHIVE_DIR" value="./output"/>
<property name="warname" value= "webStarterApp.war"/>
<path id="classpathDir">
@@ -21,10 +21,12 @@
<pathelement location="dep-jar/fluent-hc-4.3.4.jar"/>
<pathelement location="dep-jar/twitter4j-core-4.0.2.jar"/>
<pathelement location="dep-jar/gson-2.3.jar"/>
<pathelement location="dep-jar/org.ektorp-1.2.2.jar"/>
<pathelement location="dep-jar/org.ektorp-1.5.0.jar"/>
<pathelement location="dep-jar/junit-4.11.jar"/>
<pathelement location="dep-jar/hamcrest-core-1.3.jar"/>
<pathelement location="dep-jar/jackson-core-2.9.1"/>
<pathelement location="dep-jar/jackson-databind-2.9.1"/>
<pathelement location="dep-jar/jackson-annotations-2.9.1"/>
<pathelement location="dep-jar/servlet-api.jar"/>
</path>
<target name="init">
@@ -37,9 +39,6 @@
<target name="build" depends="build-project,build-war"/>
<target name="cleanall" depends="clean"/>
<target name="build-project" depends="clean,init">
<copy todir="${ARCHIVE_DIR}">
<fileset file="manifest.yml" />
</copy>
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}"
includeantruntime="false">
@@ -69,3 +68,5 @@
</target>
</project>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,7 +9,7 @@ declared-services:
applications:
- disk_quota: 1024M
name: talent-manager
path: ./webStarterApp.war
path: ./output/webStarterApp.war
instances: 1
memory: 512M
buildpack: java_buildpack
@@ -5,13 +5,10 @@
import com.ibm.personafusion.db.CloudantClient;
public class InitDB extends HttpServlet
{
public void init() throws ServletException
{
System.out.println("Initalizing DB");
CloudantClient cc = new CloudantClient();
System.out.println("DB has " + cc.getAllPeople().size() + " people in it");
}
public class InitDB extends HttpServlet {
public void init() throws ServletException {
System.out.println("Initalizing DB");
CloudantClient cc = new CloudantClient();
}
}
@@ -23,12 +23,15 @@
public class SearchController
{
/** Search for people who aren't current employees in the user's group. **/
public static List<Person> people = Config.cc.getAllPeopleNotInGroup(Constants.CURRENT_EMPLOYEES_GROUP);
public static List<Person> people = null;
/** Returns search results as a JSON string. **/
@GET
public Response handleSearch(@Context UriInfo ui)
{
if(people == null) {
people = Config.cc.getAllPeopleNotInGroup(Constants.CURRENT_EMPLOYEES_GROUP);
}
System.out.println("Num people: " + people.size());
MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
String fname = getParam("fname", queryParams);

0 comments on commit 3827f1c

Please sign in to comment.