Commit 78440442 authored by nanahira's avatar nanahira

no download check hash

parent 2a928814
Pipeline #5408 passed with stages
in 18 minutes and 23 seconds
...@@ -340,7 +340,8 @@ export class AppService extends ConsoleLogger { ...@@ -340,7 +340,8 @@ export class AppService extends ConsoleLogger {
if (archive) { if (archive) {
return archive.hash; return archive.hash;
} }
return this.checkHashFromUrl(`${this.packageS3.cdnUrl}/${path}.tar.zst`); return null;
// return this.checkHashFromUrl(`${this.packageS3.cdnUrl}/${path}.tar.zst`);
} }
async checkHashFromUrl(url: string) { async checkHashFromUrl(url: string) {
......
...@@ -209,8 +209,11 @@ export class PackagerService extends ConsoleLogger { ...@@ -209,8 +209,11 @@ export class PackagerService extends ConsoleLogger {
return hash; return hash;
} }
hash = await this.appService.lookForExistingArchiveHash(path); hash = await this.appService.lookForExistingArchiveHash(path);
this.hashCache.set(path, hash, 24 * 60 * 60 * 1000); if (hash) {
return hash; this.hashCache.set(path, hash, 24 * 60 * 60 * 1000);
return hash;
}
return null;
} }
async archive(root: string, archiveTask: ArchiveTask): Promise<Archive> { async archive(root: string, archiveTask: ArchiveTask): Promise<Archive> {
...@@ -220,10 +223,12 @@ export class PackagerService extends ConsoleLogger { ...@@ -220,10 +223,12 @@ export class PackagerService extends ConsoleLogger {
try { try {
const existing = await this.s3.fileExists(archiveName); const existing = await this.s3.fileExists(archiveName);
if (existing) { if (existing) {
archive.hash = await this.lookForExistingArchiveHash(archiveTask.path); const hash = await this.lookForExistingArchiveHash(archiveTask.path);
archive.size = existing.Size; if (hash) {
this.log(`Archive ${archiveName} exists, skipping.`); archive.size = existing.Size;
return archive; this.log(`Archive ${archiveName} exists, skipping.`);
return archive;
}
} }
const files = archiveTask.filePaths; const files = archiveTask.filePaths;
this.log(`Packaging archive ${archiveName} with ${archiveTask.exactFilePaths.length} files.`); this.log(`Packaging archive ${archiveName} with ${archiveTask.exactFilePaths.length} files.`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment