private void activity() {
CouchQuery query = new CouchQuery();
query.setViewName("server_work");
CouchQueryResults results;
try {
results = dd.performQuery(query);
} catch (Exception e) {
logger.error("Error accessing server",e);
waitMillis(60 * 1000); // wait a minute
return;
}
// Check for work
String docId = null;
JSONArray state = null;
for(JSONObject row : results.getRows()) {
String id = row.optString("id");
if( false == docIdsToSkip.contains(id) ) {
// Found some work
docId = id;
state = row.optJSONArray("key");