in src/main/java/org/apache/nutch/webui/client/impl/RemoteCommandExecutor.java [93:109]
public JobInfo call() throws Exception {
while (!Thread.interrupted()) {
JobInfo jobInfo = client.getJobInfo(jobId);
checkState(jobInfo != null, "Cannot get job info!");
State state = jobInfo.getState();
checkState(state != null, "Unknown job state!");
if (state == State.RUNNING || state == State.ANY || state == State.IDLE) {
Thread.sleep(requestDelay.getMillis());
continue;
}
return jobInfo;
}
return null;
}