minor log message tweaks
This commit is contained in:
parent
a5c0758371
commit
c7b6e7a75e
2 changed files with 215 additions and 218 deletions
|
@ -278,7 +278,10 @@ public class KnowledgeBaseUpdater {
|
|||
required = true;
|
||||
if (JenaDataSourceSetupBase.isFirstStartup()) {
|
||||
assertSuccess();
|
||||
log.info("The application is starting with an empty DB, an indication will be added to the DB that a knowledge base migration to the current version is not required.");
|
||||
log.info("The application is starting with an empty database. " +
|
||||
"An indication will be added to the database that a " +
|
||||
"knowledge base migration to the current version is " +
|
||||
"not required.");
|
||||
required = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,16 +121,7 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
|||
|
||||
if (isRecomputeRequired(sce.getServletContext())) {
|
||||
log.info("ABox inference recompute required.");
|
||||
|
||||
int sleeps = 0;
|
||||
while (sleeps < 1000 && pelletListener.isReasoning()) {
|
||||
if ((sleeps % 30) == 0) {
|
||||
log.info("Waiting for initial TBox reasoning to complete");
|
||||
}
|
||||
Thread.sleep(100);
|
||||
sleeps++;
|
||||
}
|
||||
|
||||
waitForTBoxReasoning(pelletListener);
|
||||
if (JenaDataSourceSetupBase.isFirstStartup()) {
|
||||
simpleReasoner.recompute();
|
||||
} else {
|
||||
|
@ -140,16 +131,7 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
|||
|
||||
} else if ( isMSTComputeRequired(sce.getServletContext()) ) {
|
||||
log.info("mostSpecificType computation required. It will be done in a separate thread.");
|
||||
|
||||
int sleeps = 0;
|
||||
while (sleeps < 1000 && pelletListener.isReasoning()) {
|
||||
if ((sleeps % 30) == 0) {
|
||||
log.info("Waiting for initial TBox reasoning to complete");
|
||||
}
|
||||
Thread.sleep(100);
|
||||
sleeps++;
|
||||
}
|
||||
|
||||
waitForTBoxReasoning(pelletListener);
|
||||
new Thread(new MostSpecificTypeRecomputer(simpleReasoner),"MostSpecificTypeComputer").start();
|
||||
}
|
||||
|
||||
|
@ -164,6 +146,18 @@ public class SimpleReasonerSetup implements ServletContextListener {
|
|||
}
|
||||
}
|
||||
|
||||
private void waitForTBoxReasoning(PelletListener pelletListener)
|
||||
throws InterruptedException {
|
||||
int sleeps = 0;
|
||||
while (sleeps < 1000 && pelletListener.isReasoning()) {
|
||||
if ((sleeps % 10) == 0) { // print message at 10 second intervals
|
||||
log.info("Waiting for initial TBox reasoning to complete");
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
sleeps++;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contextDestroyed(ServletContextEvent sce) {
|
||||
log.info("received contextDestroyed notification");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue