mirror of
https://github.com/actions/toolkit.git
synced 2026-08-16 00:00:21 +02:00
Add option for concurrent cache downloads with timeout (#1484)
* Add option for concurrent cache downloads with timeout * Add release notes * Fix lint
This commit is contained in:
Vendored
+12
-1
@@ -39,6 +39,12 @@ export interface DownloadOptions {
|
||||
*/
|
||||
downloadConcurrency?: number
|
||||
|
||||
/**
|
||||
* Indicates whether to use Actions HttpClient with concurrency
|
||||
* for Azure Blob Storage
|
||||
*/
|
||||
concurrentBlobDownloads?: boolean
|
||||
|
||||
/**
|
||||
* Maximum time for each download request, in milliseconds (this
|
||||
* option only applies when using the Azure SDK)
|
||||
@@ -98,7 +104,8 @@ export function getUploadOptions(copy?: UploadOptions): UploadOptions {
|
||||
*/
|
||||
export function getDownloadOptions(copy?: DownloadOptions): DownloadOptions {
|
||||
const result: DownloadOptions = {
|
||||
useAzureSdk: true,
|
||||
useAzureSdk: false,
|
||||
concurrentBlobDownloads: true,
|
||||
downloadConcurrency: 8,
|
||||
timeoutInMs: 30000,
|
||||
segmentTimeoutInMs: 600000,
|
||||
@@ -110,6 +117,10 @@ export function getDownloadOptions(copy?: DownloadOptions): DownloadOptions {
|
||||
result.useAzureSdk = copy.useAzureSdk
|
||||
}
|
||||
|
||||
if (typeof copy.concurrentBlobDownloads === 'boolean') {
|
||||
result.concurrentBlobDownloads = copy.concurrentBlobDownloads
|
||||
}
|
||||
|
||||
if (typeof copy.downloadConcurrency === 'number') {
|
||||
result.downloadConcurrency = copy.downloadConcurrency
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user