removed thread pool again and hopefully deleting works as intended now
This commit is contained in:
@@ -90,7 +90,6 @@ public class DiscordHandler extends ListenerAdapter {
|
||||
private static Datahandler datahandler;
|
||||
private static StanfordCoreNLP stanfordCoreNLPSentiment;
|
||||
private static ExecutorService executorService = Executors.newFixedThreadPool(1);
|
||||
private static ExecutorService executorServiceResponse = Executors.newFixedThreadPool(2);
|
||||
private static ExecutorService executorServiceIngame = Executors.newFixedThreadPool(2);
|
||||
|
||||
//TODO add python program that edits the java code. python program just adds test if statements on
|
||||
@@ -169,17 +168,12 @@ public class DiscordHandler extends ListenerAdapter {
|
||||
}
|
||||
if (mentionedBot || channelName.contains("general-autism")) {
|
||||
final String contentF = content;
|
||||
executorServiceResponse.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String ResponseStr = datahandler.getResponseMsg(contentF, username, stanfordCoreNLP, stanfordCoreNLPSentiment,
|
||||
false);
|
||||
if (!ResponseStr.isEmpty()) {
|
||||
System.out.print("\nResponseStr3: " + ResponseStr + "\n");
|
||||
event.getMessage().getChannel().sendMessage(ResponseStr).queue();
|
||||
}
|
||||
}
|
||||
});
|
||||
String ResponseStr = datahandler.getResponseMsg(contentF, username, stanfordCoreNLP, stanfordCoreNLPSentiment,
|
||||
false);
|
||||
if (!ResponseStr.isEmpty()) {
|
||||
System.out.print("\nResponseStr3: " + ResponseStr + "\n");
|
||||
event.getMessage().getChannel().sendMessage(ResponseStr).queue();
|
||||
}
|
||||
} else {
|
||||
final String contentF = content;
|
||||
executorService.execute(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user