mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-22 06:03:49 +08:00
refactor(installer): 调整下载重试超时配置和次数
更新了下载重试的超时时间列表和总重试次数,从原3次调整为10次,优化下载成功率
This commit is contained in:
@@ -405,8 +405,8 @@ async function processNextInQueue() {
|
|||||||
|
|
||||||
sendStatus("downloading");
|
sendStatus("downloading");
|
||||||
|
|
||||||
// 下载重试逻辑:每次超时时间递增,最多3次
|
// 下载重试逻辑:共10次,5次3秒,3次5秒,2次10秒
|
||||||
const timeoutList = [3000, 5000, 15000]; // 第一次3秒,第二次5秒,第三次15秒
|
const timeoutList = [3000, 3000, 3000, 3000, 3000, 5000, 5000, 5000, 10000, 10000];
|
||||||
let retryCount = 0;
|
let retryCount = 0;
|
||||||
let downloadSuccess = false;
|
let downloadSuccess = false;
|
||||||
|
|
||||||
|
|||||||
@@ -104,8 +104,8 @@ export const downloadPackage = async ({
|
|||||||
|
|
||||||
onStatus?.("downloading");
|
onStatus?.("downloading");
|
||||||
|
|
||||||
// 下载重试逻辑:每次超时时间递增,最多3次
|
// 下载重试逻辑:共10次,5次3秒,3次5秒,2次10秒
|
||||||
const timeoutList = [3000, 5000, 15000];
|
const timeoutList = [3000, 3000, 3000, 3000, 3000, 5000, 5000, 5000, 10000, 10000];
|
||||||
let retryCount = 0;
|
let retryCount = 0;
|
||||||
let downloadSuccess = false;
|
let downloadSuccess = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user