mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 02:56:54 +08:00
set retry limit and make retries visible logs (#170)
This commit is contained in:
6
lib/installer.js
generated
6
lib/installer.js
generated
@@ -84,8 +84,9 @@ function getJuliaVersionInfo() {
|
|||||||
const versionsFile = yield retry((bail) => __awaiter(this, void 0, void 0, function* () {
|
const versionsFile = yield retry((bail) => __awaiter(this, void 0, void 0, function* () {
|
||||||
return yield tc.downloadTool('https://julialang-s3.julialang.org/bin/versions.json');
|
return yield tc.downloadTool('https://julialang-s3.julialang.org/bin/versions.json');
|
||||||
}), {
|
}), {
|
||||||
|
retries: 5,
|
||||||
onRetry: (err) => {
|
onRetry: (err) => {
|
||||||
core.debug(`Download of versions.json failed, trying again. Error: ${err}`);
|
core.info(`Download of versions.json failed, trying again. Error: ${err}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return JSON.parse(fs.readFileSync(versionsFile).toString());
|
return JSON.parse(fs.readFileSync(versionsFile).toString());
|
||||||
@@ -226,8 +227,9 @@ function installJulia(versionInfo, version, arch) {
|
|||||||
const juliaDownloadPath = yield retry((bail) => __awaiter(this, void 0, void 0, function* () {
|
const juliaDownloadPath = yield retry((bail) => __awaiter(this, void 0, void 0, function* () {
|
||||||
return yield tc.downloadTool(downloadURL);
|
return yield tc.downloadTool(downloadURL);
|
||||||
}), {
|
}), {
|
||||||
|
retries: 5,
|
||||||
onRetry: (err) => {
|
onRetry: (err) => {
|
||||||
core.debug(`Download of ${downloadURL} failed, trying again. Error: ${err}`);
|
core.info(`Download of ${downloadURL} failed, trying again. Error: ${err}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Verify checksum
|
// Verify checksum
|
||||||
|
|||||||
@@ -54,8 +54,9 @@ export async function getJuliaVersionInfo(): Promise<object> {
|
|||||||
const versionsFile = await retry(async (bail: Function) => {
|
const versionsFile = await retry(async (bail: Function) => {
|
||||||
return await tc.downloadTool('https://julialang-s3.julialang.org/bin/versions.json')
|
return await tc.downloadTool('https://julialang-s3.julialang.org/bin/versions.json')
|
||||||
}, {
|
}, {
|
||||||
|
retries: 5,
|
||||||
onRetry: (err: Error) => {
|
onRetry: (err: Error) => {
|
||||||
core.debug(`Download of versions.json failed, trying again. Error: ${err}`)
|
core.info(`Download of versions.json failed, trying again. Error: ${err}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -208,8 +209,9 @@ export async function installJulia(versionInfo, version: string, arch: string):
|
|||||||
const juliaDownloadPath = await retry(async (bail: Function) => {
|
const juliaDownloadPath = await retry(async (bail: Function) => {
|
||||||
return await tc.downloadTool(downloadURL)
|
return await tc.downloadTool(downloadURL)
|
||||||
}, {
|
}, {
|
||||||
|
retries: 5,
|
||||||
onRetry: (err: Error) => {
|
onRetry: (err: Error) => {
|
||||||
core.debug(`Download of ${downloadURL} failed, trying again. Error: ${err}`)
|
core.info(`Download of ${downloadURL} failed, trying again. Error: ${err}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user