Commit bcdeb361 authored by alex yao's avatar alex yao

feat: 首页推荐问

parent 06124b3c
...@@ -214,7 +214,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService { ...@@ -214,7 +214,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
} }
public void createRecommendQuestion() throws InterruptedException { public void createRecommendQuestion() throws InterruptedException {
List<String> questions = new CopyOnWriteArrayList<>(); List<Object> questions = new CopyOnWriteArrayList<>();
ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 10, 5, TimeUnit.SECONDS, new LinkedBlockingDeque<>()); ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(10, 10, 5, TimeUnit.SECONDS, new LinkedBlockingDeque<>());
CountDownLatch countDownLatch = new CountDownLatch(20); CountDownLatch countDownLatch = new CountDownLatch(20);
...@@ -242,9 +242,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService { ...@@ -242,9 +242,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
countDownLatch.await(2, TimeUnit.MINUTES); countDownLatch.await(2, TimeUnit.MINUTES);
redisService.del(AGENT_APPLICATION_RECOMMEND_QUESTIONS); redisService.del(AGENT_APPLICATION_RECOMMEND_QUESTIONS);
for (String question : questions) { redisService.lSet(AGENT_APPLICATION_RECOMMEND_QUESTIONS, questions);
redisService.lSet(AGENT_APPLICATION_RECOMMEND_QUESTIONS, question);
}
} }
private void buildMessages(String dialogsId, String agentId, Long userId, List<Message> messages, String input) throws Exception { private void buildMessages(String dialogsId, String agentId, Long userId, List<Message> messages, String input) throws Exception {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment