Merge remote-tracking branch 'refs/remotes/origin/pdotl-zstd-win-patch' into pdotl-zstd-win-patch

This commit is contained in:
Lovepreet Singh
2022-08-18 11:11:29 +00:00
5 changed files with 38 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ import * as io from '@actions/io'
import {existsSync, writeFileSync} from 'fs'
import * as path from 'path'
import * as utils from './cacheUtils'
import {CompressionMethod, TarOperation} from './constants'
import {CompressionMethod} from './constants'
const IS_WINDOWS = process.platform === 'win32'

View File

@@ -112,10 +112,22 @@ export function getDownloadOptions(copy?: DownloadOptions): DownloadOptions {
result.segmentTimeoutInMs = copy.segmentTimeoutInMs
}
}
const segmentDownloadTimeoutMins =
process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']
if (
segmentDownloadTimeoutMins &&
!isNaN(Number(segmentDownloadTimeoutMins)) &&
isFinite(Number(segmentDownloadTimeoutMins))
) {
result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1000
}
core.debug(`Use Azure SDK: ${result.useAzureSdk}`)
core.debug(`Download concurrency: ${result.downloadConcurrency}`)
core.debug(`Request timeout (ms): ${result.timeoutInMs}`)
core.debug(
`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`
)
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`)
return result