reduced by 2 threads, added more variety to responses by excluding messages used in past 5 days

This commit is contained in:
jenz 2023-06-05 11:53:41 +02:00
parent 9b371ce1ca
commit 0af6bd2421
2 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,8 @@ public class DataMapper {
ArrayList<String> arrayListStr = new ArrayList();
try {
l_cCon = DBCPDataSource.getConnection();
String l_sSQL = "SELECT * FROM `Sentences` order by LENGTH(Strings) desc";
//not better, just forces the responds to variate a lot more
String l_sSQL = "SELECT * FROM Sentences where last_used < CURRENT_DATE() - INTERVAL 5 DAY order by LENGTH(Strings) desc";
l_pStatement = l_cCon.prepareStatement(l_sSQL);
l_rsSearch = l_pStatement.executeQuery();
while (l_rsSearch.next()) {

View File

@ -27,7 +27,7 @@ import java.util.regex.Pattern;
public class Datahandler {
private ExecutorService pool = Executors.newFixedThreadPool(6);
private ExecutorService pool = Executors.newFixedThreadPool(4);
private CompletionService completionService = new ExecutorCompletionService(pool);
private HashMap<String, Annotation> pipelineAnnotationCache;
private HashMap<String, Annotation> pipelineSentimentAnnotationCache;