mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
Improved the query logging
This commit is contained in:
1 parent
603fc57046
commit
40d0b08986
1 file changed
+6
-2
@@ -72,6 +72,7 @@ public class ProcessorQuery<AggregatedType, DataSourceType> implements Query<Agg
|
||||
}
|
||||
|
||||
private QueryResult<AggregatedType> processQuery(long timeoutInMillis) throws InterruptedException, TimeoutException {
|
||||
processorTimedOut = false;
|
||||
final long startTime = System.nanoTime();
|
||||
executor.execute(new Runnable() {
|
||||
@Override
|
||||
@@ -80,7 +81,11 @@ public class ProcessorQuery<AggregatedType, DataSourceType> implements Query<Agg
|
||||
firstProcessor.onElement(dataSource);
|
||||
firstProcessor.finish();
|
||||
} catch (InterruptedException e) {
|
||||
LOGGER.log(Level.WARNING, "The query processing got interrupted.", e);
|
||||
if (processorTimedOut) {
|
||||
LOGGER.log(Level.INFO, "The query processing timed out.");
|
||||
} else {
|
||||
LOGGER.log(Level.WARNING, "The query processing got interrupted.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -105,7 +110,6 @@ public class ProcessorQuery<AggregatedType, DataSourceType> implements Query<Agg
|
||||
}
|
||||
}
|
||||
workIsDone = false;
|
||||
processorTimedOut = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user