feat: 为图片生成结果下载单独提供重试机制以及相关设置 (closes #20)

This commit is contained in:
foxhui
2026-03-23 00:40:11 +08:00
parent b9f4fafec5
commit 2029ef345e
17 changed files with 114 additions and 30 deletions
+26
View File
@@ -376,6 +376,32 @@ const handleRemoveWorker = (index) => {
</div>
</a-col>
</a-row>
<a-divider style="margin: 12px 0;" />
<a-row :gutter="16">
<a-col :xs="24" :md="12">
<div style="margin-bottom: 8px;">
<div style="font-weight: 600; margin-bottom: 8px;">图片下载重试</div>
<div style="font-size: 12px; color: #8c8c8c; margin-bottom: 12px;">
启用后图片/视频下载失败时会自动重试下载不重新生成
</div>
<a-switch v-model:checked="poolConfig.failover.imgDlRetry" />
</div>
</a-col>
<a-col :xs="24" :md="12">
<div style="margin-bottom: 8px;">
<div style="font-weight: 600; margin-bottom: 8px;">下载重试次数</div>
<div style="font-size: 12px; color: #8c8c8c; margin-bottom: 12px;">
图片下载失败时的最大重试次数范围 1-10
</div>
<a-input-number v-model:value="poolConfig.failover.imgDlRetryMaxRetries" :min="1"
:max="10" :disabled="!poolConfig.failover.imgDlRetry" style="width: 100%"
placeholder="请输入下载重试次数" />
</div>
</a-col>
</a-row>
</a-collapse-panel>
</a-collapse>
</div>
+6 -2
View File
@@ -12,7 +12,9 @@ export const useSettingsStore = defineStore('settings', {
waitTimeout: 120,
failover: {
enabled: false,
maxRetries: 3
maxRetries: 3,
imgDlRetry: false,
imgDlRetryMaxRetries: 2
}
},
adapterConfig: {},
@@ -168,7 +170,9 @@ export const useSettingsStore = defineStore('settings', {
waitTimeout: data.waitTimeout ?? 120,
failover: {
enabled: data.failover?.enabled || false,
maxRetries: data.failover?.maxRetries || 3
maxRetries: data.failover?.maxRetries || 3,
imgDlRetry: data.failover?.imgDlRetry || false,
imgDlRetryMaxRetries: data.failover?.imgDlRetryMaxRetries ?? 2
}
};
}