|
|
@@ -748,9 +748,9 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
|
|
|
synchronized (key.intern()) {
|
|
|
String currentProgressStr = redisService.getStr(key);
|
|
|
- int currentProgress = currentProgressStr == null ? -1 : Integer.parseInt(currentProgressStr);
|
|
|
+ int currentProgress = StringUtils.isBlank(currentProgressStr) ? 0 : Integer.parseInt(currentProgressStr);
|
|
|
if (conversation.getProgressNum() > currentProgress) {
|
|
|
- redisService.set(key, String.valueOf(progress), RedisService.key.MIDJOURNEY_PROGRESS.getTimeout());
|
|
|
+ redisService.set(key, String.valueOf(conversation.getProgressNum()), RedisService.key.MIDJOURNEY_PROGRESS.getTimeout());
|
|
|
sendProgressToClient(conversation);
|
|
|
}
|
|
|
}
|