#8 check if solr is available, and modify messages.
This commit is contained in:
parent
376b8564e4
commit
9f14968b2a
2 changed files with 7 additions and 2 deletions
|
@ -35,6 +35,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import jp.sf.fess.Constants;
|
||||
import jp.sf.fess.FessSystemException;
|
||||
import jp.sf.fess.db.allcommon.CDef;
|
||||
import jp.sf.fess.helper.CrawlingSessionHelper;
|
||||
import jp.sf.fess.helper.DataIndexHelper;
|
||||
|
@ -378,6 +379,10 @@ public class Crawler implements Serializable {
|
|||
|
||||
final SolrGroup updateSolrGroup = solrGroupManager
|
||||
.getSolrGroup(QueryType.ADD);
|
||||
if (!updateSolrGroup.isActive(QueryType.ADD)) {
|
||||
throw new FessSystemException("SolrGroup "
|
||||
+ updateSolrGroup.getGroupName() + " is not available.");
|
||||
}
|
||||
|
||||
// setup path mapping
|
||||
final List<CDef.ProcessType> ptList = new ArrayList<CDef.ProcessType>();
|
||||
|
@ -506,7 +511,7 @@ public class Crawler implements Serializable {
|
|||
|
||||
return exitCode;
|
||||
} catch (final Throwable t) { // NOPMD
|
||||
logger.warn("Interrupted a crawl task.", t);
|
||||
logger.warn("An exception occurs on the crawl task.", t);
|
||||
return Constants.EXIT_FAIL;
|
||||
} finally {
|
||||
pathMappingHelper.removePathMappingList(options.sessionId);
|
||||
|
|
|
@ -295,7 +295,7 @@ public class SystemHelper implements Serializable {
|
|||
+ " - Crawler Process Output:\n" + it.getOutput());
|
||||
}
|
||||
if (exitValue != 0) {
|
||||
throw new FessSystemException("Exit code is " + exitValue
|
||||
throw new FessSystemException("Exit Code: " + exitValue
|
||||
+ "\nOutput:\n" + it.getOutput());
|
||||
}
|
||||
} catch (final FessSystemException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue