mirror of
https://github.com/actions/cache.git
synced 2025-07-10 21:00:46 +00:00
Fix threads array
This commit is contained in:
parent
73a15dc5a9
commit
16019b42a9
3 changed files with 3 additions and 3 deletions
|
@ -182,7 +182,7 @@ async function uploadFile(restClient: RestClient, cacheId: number, archivePath:
|
|||
const fd = fs.openSync(archivePath, "r"); // Use the same fd for serial reads? Will this work for parallel too?
|
||||
|
||||
const concurrency = 4; // # of HTTP requests in parallel
|
||||
const threads = new Array(concurrency);
|
||||
const threads = [...new Array(concurrency).keys()];
|
||||
core.debug("Awaiting all uploads");
|
||||
let offset = 0;
|
||||
await Promise.all(threads.map(async () => { // This might not work cause something something closures
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue