mirror of https://github.com/actions/cache.git
Test disabling concurrency
parent
aced43a650
commit
6efe05572d
|
@ -2403,20 +2403,22 @@ function uploadFile(httpClient, cacheId, archivePath) {
|
||||||
core.debug("Awaiting all uploads");
|
core.debug("Awaiting all uploads");
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
try {
|
try {
|
||||||
yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () {
|
// await Promise.all(
|
||||||
while (offset < fileSize) {
|
// parallelUploads.map(async () => {
|
||||||
const chunkSize = Math.min(fileSize - offset, MAX_CHUNK_SIZE);
|
while (offset < fileSize) {
|
||||||
const start = offset;
|
const chunkSize = Math.min(fileSize - offset, MAX_CHUNK_SIZE);
|
||||||
const end = offset + chunkSize - 1;
|
const start = offset;
|
||||||
offset += MAX_CHUNK_SIZE;
|
const end = offset + chunkSize - 1;
|
||||||
yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, {
|
offset += MAX_CHUNK_SIZE;
|
||||||
fd,
|
yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, {
|
||||||
start,
|
fd,
|
||||||
end,
|
start,
|
||||||
autoClose: false
|
end,
|
||||||
}), start, end);
|
autoClose: false
|
||||||
}
|
}), start, end);
|
||||||
})));
|
}
|
||||||
|
// })
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
fs.closeSync(fd);
|
fs.closeSync(fd);
|
||||||
|
|
|
@ -2403,20 +2403,22 @@ function uploadFile(httpClient, cacheId, archivePath) {
|
||||||
core.debug("Awaiting all uploads");
|
core.debug("Awaiting all uploads");
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
try {
|
try {
|
||||||
yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () {
|
// await Promise.all(
|
||||||
while (offset < fileSize) {
|
// parallelUploads.map(async () => {
|
||||||
const chunkSize = Math.min(fileSize - offset, MAX_CHUNK_SIZE);
|
while (offset < fileSize) {
|
||||||
const start = offset;
|
const chunkSize = Math.min(fileSize - offset, MAX_CHUNK_SIZE);
|
||||||
const end = offset + chunkSize - 1;
|
const start = offset;
|
||||||
offset += MAX_CHUNK_SIZE;
|
const end = offset + chunkSize - 1;
|
||||||
yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, {
|
offset += MAX_CHUNK_SIZE;
|
||||||
fd,
|
yield uploadChunk(httpClient, resourceUrl, () => fs.createReadStream(archivePath, {
|
||||||
start,
|
fd,
|
||||||
end,
|
start,
|
||||||
autoClose: false
|
end,
|
||||||
}), start, end);
|
autoClose: false
|
||||||
}
|
}), start, end);
|
||||||
})));
|
}
|
||||||
|
// })
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
fs.closeSync(fd);
|
fs.closeSync(fd);
|
||||||
|
|
|
@ -342,8 +342,8 @@ async function uploadFile(
|
||||||
let offset = 0;
|
let offset = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await Promise.all(
|
// await Promise.all(
|
||||||
parallelUploads.map(async () => {
|
// parallelUploads.map(async () => {
|
||||||
while (offset < fileSize) {
|
while (offset < fileSize) {
|
||||||
const chunkSize = Math.min(
|
const chunkSize = Math.min(
|
||||||
fileSize - offset,
|
fileSize - offset,
|
||||||
|
@ -367,8 +367,8 @@ async function uploadFile(
|
||||||
end
|
end
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
})
|
// })
|
||||||
);
|
// );
|
||||||
} finally {
|
} finally {
|
||||||
fs.closeSync(fd);
|
fs.closeSync(fd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue