added threads to handle second importance processing

This commit is contained in:
christian 2021-12-05 16:56:46 +01:00
parent 29d1f280b7
commit 9567db391f

View File

@ -165,8 +165,12 @@ public class DiscordHandler extends ListenerAdapter {
event.getMessage().getChannel().sendMessage(ResponseStr).queue();
}
} else {
String strF = datahandler.trimString(content);
datahandler.getResponseFutures(strF, stanfordCoreNLP, stanfordCoreNLPSentiment);
final String contentF = content;
//these should be able to run on their own.
new Thread(() -> {
String strF = datahandler.trimString(contentF);
datahandler.getResponseFutures(strF, stanfordCoreNLP, stanfordCoreNLPSentiment);
}).start();
}
}
}