Commit 82392780 authored by nanahira's avatar nanahira

fix archive purge

parent 9d57190d
Pipeline #13253 passed with stages
in 4 minutes and 39 seconds
......@@ -294,19 +294,19 @@ export class AppService extends ConsoleLogger {
async purgeOldArchives() {
const paths = await this.getPurgeOldArchivePaths();
this.log(`Will purge file ${paths.join(',')} (${paths.length}) for old archives.`);
if (!paths.length) {
return;
}
this.log(`Will purge file ${paths.join(',')} for old archives.`);
return this.packageS3.removeObjects(paths);
}
private async purgeRelatedArchives(build: Build) {
const paths = await this.getArchivePathsToPurge(build.id);
this.log(`Will purge file ${paths.join(',')} (${paths.length}) for build ${build.id} removal.`);
if (!paths.length) {
return;
}
this.log(`Will purge file ${paths.join(',')} for build ${build.id} removal.`);
return this.packageS3.removeObjects(paths);
}
......
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