mirror of https://github.com/actions/toolkit
cleaning up logs
parent
d617670abc
commit
2124ef2413
|
@ -42,11 +42,10 @@ async function streamExtract(url: string, directory: string): Promise<void> {
|
||||||
while (retryCount < 5) {
|
while (retryCount < 5) {
|
||||||
try {
|
try {
|
||||||
await streamExtractExternal(url, directory)
|
await streamExtractExternal(url, directory)
|
||||||
core.info(`Artifact downloaded successfully after ${retryCount} retries.`)
|
|
||||||
return
|
return
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
retryCount++
|
retryCount++
|
||||||
core.warning(
|
core.debug(
|
||||||
`Failed to download artifact after ${retryCount} retries due to ${error.message}. Retrying in 5 seconds...`
|
`Failed to download artifact after ${retryCount} retries due to ${error.message}. Retrying in 5 seconds...`
|
||||||
)
|
)
|
||||||
// wait 5 seconds before retrying
|
// wait 5 seconds before retrying
|
||||||
|
@ -61,11 +60,8 @@ export async function streamExtractExternal(
|
||||||
url: string,
|
url: string,
|
||||||
directory: string
|
directory: string
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
core.info(`Stream extract internal started`)
|
|
||||||
|
|
||||||
const client = new httpClient.HttpClient(getUserAgentString())
|
const client = new httpClient.HttpClient(getUserAgentString())
|
||||||
const response = await client.get(url)
|
const response = await client.get(url)
|
||||||
|
|
||||||
if (response.message.statusCode !== 200) {
|
if (response.message.statusCode !== 200) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`
|
`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`
|
||||||
|
|
Loading…
Reference in New Issue