mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-07 09:39:02 +08:00
Update with reviewer feedback
This commit is contained in:
parent
cc474239c9
commit
c4a92b0b60
14
packages/cache/src/internal/downloadUtils.ts
vendored
14
packages/cache/src/internal/downloadUtils.ts
vendored
@ -120,12 +120,12 @@ export class DownloadProgress {
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback used to update the progress.
|
||||
*
|
||||
* @param progress the progress event
|
||||
* Returns a function used to handle TransferProgressEvents.
|
||||
*/
|
||||
onProgressCallback(progress: TransferProgressEvent): void {
|
||||
this.setReceivedBytes(progress.loadedBytes)
|
||||
onProgress(): (progress: TransferProgressEvent) => void {
|
||||
return (progress: TransferProgressEvent) => {
|
||||
this.setReceivedBytes(progress.loadedBytes)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -261,9 +261,7 @@ export async function downloadCacheStorageSDK(
|
||||
segmentSize,
|
||||
{
|
||||
concurrency: options.downloadConcurrency,
|
||||
onProgress: downloadProgress.onProgressCallback.bind(
|
||||
downloadProgress
|
||||
)
|
||||
onProgress: downloadProgress.onProgress()
|
||||
}
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user