mirror of
				https://gitea.com/actions/cache.git
				synced 2025-11-02 07:47:08 +00:00 
			
		
		
		
	Add missing await
This commit is contained in:
		
							
								
								
									
										2
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							@@ -1626,7 +1626,7 @@ function uploadFile(restClient, cacheId, archivePath) {
 | 
				
			|||||||
        const threads = new Array(concurrency);
 | 
					        const threads = new Array(concurrency);
 | 
				
			||||||
        core.debug("Awaiting all uploads");
 | 
					        core.debug("Awaiting all uploads");
 | 
				
			||||||
        let offset = 0;
 | 
					        let offset = 0;
 | 
				
			||||||
        Promise.all(threads.map(() => __awaiter(this, void 0, void 0, function* () {
 | 
					        yield Promise.all(threads.map(() => __awaiter(this, void 0, void 0, function* () {
 | 
				
			||||||
            while (offset < fileSize) {
 | 
					            while (offset < fileSize) {
 | 
				
			||||||
                const chunkSize = offset + MAX_CHUNK_SIZE > fileSize ? fileSize - offset : MAX_CHUNK_SIZE;
 | 
					                const chunkSize = offset + MAX_CHUNK_SIZE > fileSize ? fileSize - offset : MAX_CHUNK_SIZE;
 | 
				
			||||||
                const start = offset;
 | 
					                const start = offset;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							@@ -1626,7 +1626,7 @@ function uploadFile(restClient, cacheId, archivePath) {
 | 
				
			|||||||
        const threads = new Array(concurrency);
 | 
					        const threads = new Array(concurrency);
 | 
				
			||||||
        core.debug("Awaiting all uploads");
 | 
					        core.debug("Awaiting all uploads");
 | 
				
			||||||
        let offset = 0;
 | 
					        let offset = 0;
 | 
				
			||||||
        Promise.all(threads.map(() => __awaiter(this, void 0, void 0, function* () {
 | 
					        yield Promise.all(threads.map(() => __awaiter(this, void 0, void 0, function* () {
 | 
				
			||||||
            while (offset < fileSize) {
 | 
					            while (offset < fileSize) {
 | 
				
			||||||
                const chunkSize = offset + MAX_CHUNK_SIZE > fileSize ? fileSize - offset : MAX_CHUNK_SIZE;
 | 
					                const chunkSize = offset + MAX_CHUNK_SIZE > fileSize ? fileSize - offset : MAX_CHUNK_SIZE;
 | 
				
			||||||
                const start = offset;
 | 
					                const start = offset;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -185,7 +185,7 @@ async function uploadFile(restClient: RestClient, cacheId: number, archivePath:
 | 
				
			|||||||
    const threads = new Array(concurrency);
 | 
					    const threads = new Array(concurrency);
 | 
				
			||||||
    core.debug("Awaiting all uploads");
 | 
					    core.debug("Awaiting all uploads");
 | 
				
			||||||
    let offset = 0;
 | 
					    let offset = 0;
 | 
				
			||||||
    Promise.all(threads.map(async () => { // This might not work cause something something closures
 | 
					    await Promise.all(threads.map(async () => { // This might not work cause something something closures
 | 
				
			||||||
        while (offset < fileSize) {
 | 
					        while (offset < fileSize) {
 | 
				
			||||||
            const chunkSize = offset + MAX_CHUNK_SIZE > fileSize ? fileSize - offset : MAX_CHUNK_SIZE;
 | 
					            const chunkSize = offset + MAX_CHUNK_SIZE > fileSize ? fileSize - offset : MAX_CHUNK_SIZE;
 | 
				
			||||||
            const start = offset;
 | 
					            const start = offset;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user