修复:在app.js中,将Promise.all更改为Promise.allSettled以处理图像生成失败,并将generateImageWithRetry的最大重试次数增加到15次。
This commit is contained in:
@@ -2042,7 +2042,7 @@ const app = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 等待所有请求完成
|
// 等待所有请求完成
|
||||||
await Promise.all(promises);
|
await Promise.allSettled(promises);
|
||||||
|
|
||||||
// 检查存储空间
|
// 检查存储空间
|
||||||
await utils.checkAndCleanStorage();
|
await utils.checkAndCleanStorage();
|
||||||
@@ -2065,7 +2065,7 @@ const app = {
|
|||||||
|
|
||||||
// 带重试机制的图像生成方法
|
// 带重试机制的图像生成方法
|
||||||
generateImageWithRetry: async function(message, images, settings, imageIndex, totalImages) {
|
generateImageWithRetry: async function(message, images, settings, imageIndex, totalImages) {
|
||||||
const maxRetries = 5;
|
const maxRetries = 15;
|
||||||
let retryCount = 0;
|
let retryCount = 0;
|
||||||
|
|
||||||
while (retryCount <= maxRetries) {
|
while (retryCount <= maxRetries) {
|
||||||
|
|||||||
Reference in New Issue
Block a user