|
|
@@ -957,13 +957,6 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
}
|
|
|
redisService.set(RedisService.key.MIDJOURNEY_CONVERSATION.getName() + conversation.getTaskId(), conversation,RedisService.key.MIDJOURNEY_CONVERSATION.getTimeout());
|
|
|
|
|
|
- TASK_EXECUTOR.execute(()->{
|
|
|
- handleCallback(conversation);
|
|
|
- conversationMapper.update(null, QueryWrapperUtils.buildUpdateWrapper((wrapper)->{
|
|
|
- wrapper.eq(MidjourneyUserConversation::getAction,"MODEL").eq(MidjourneyUserConversation::getTaskId, conversation.getTaskId()).set(MidjourneyUserConversation::getAction, conversation.getAction());
|
|
|
- }));
|
|
|
- });
|
|
|
-
|
|
|
TASK_EXECUTOR.execute(() -> {
|
|
|
try {
|
|
|
sync(conversation);
|
|
|
@@ -971,6 +964,14 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ TASK_EXECUTOR.execute(()->{
|
|
|
+ handleCallback(conversation);
|
|
|
+ conversationMapper.update(null, QueryWrapperUtils.buildUpdateWrapper((wrapper)->{
|
|
|
+ wrapper.eq(MidjourneyUserConversation::getAction,"MODEL").eq(MidjourneyUserConversation::getTaskId, conversation.getTaskId()).set(MidjourneyUserConversation::getAction, conversation.getAction());
|
|
|
+ }));
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void handleCallback(MidjourneyUserConversation conversation) {
|