NIHVIVO-2952 abox recompute synchronously on a fresh DB and asynchronously otherwise.
This commit is contained in:
parent
bbe47f84d8
commit
9bf0ebafa8
1 changed files with 8 additions and 2 deletions
|
@ -99,7 +99,7 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
|||
sce.getServletContext().setAttribute(SimpleReasoner.class.getName(),simpleReasoner);
|
||||
|
||||
if (isRecomputeRequired(sce.getServletContext())) {
|
||||
log.info("ABox inference recompute required. It will be done in a separate thread.");
|
||||
log.info("ABox inference recompute required.");
|
||||
|
||||
int sleeps = 0;
|
||||
while (sleeps < 1000 && pelletListener.isReasoning()) {
|
||||
|
@ -110,7 +110,13 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
|||
sleeps++;
|
||||
}
|
||||
|
||||
new Thread(new ABoxRecomputer(simpleReasoner),"ABoxRecomputer").start();
|
||||
if (JenaDataSourceSetupBase.isFirstStartup()) {
|
||||
simpleReasoner.recompute();
|
||||
} else {
|
||||
log.info("starting ABox inference recompute in a separate thread.");
|
||||
new Thread(new ABoxRecomputer(simpleReasoner),"ABoxRecomputer").start();
|
||||
}
|
||||
|
||||
} else if ( isMSTComputeRequired(sce.getServletContext()) ) {
|
||||
log.info("mostSpecificType computation required. It will be done in a separate thread.");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue