Skip to content

Commit

Permalink
DOP-4414 undoing changes for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Mar 26, 2024
1 parent a8a1ce6 commit 20bf69c
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions src/job/productionJobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,36 +140,38 @@ export class ProductionJobHandler extends JobHandler {
}
}

// getPathPrefix(): string {
// try {
// const prefix = this.currJob.payload.urlSlug
// ? `${this.currJob.payload.urlSlug}/${this.currJob.payload.prefix}`
// : this.currJob.payload.prefix;
// if (this.currJob.payload.newHead && this.currJob.payload.action == 'automatedTest') {
// return `${prefix}/${this.currJob.payload.newHead}`;
// }
// return prefix;
// } catch (error) {
// this.logger.save(this.currJob._id, error).then();
// throw new InvalidJobError(error.message);
// }
// }

getPathPrefix(): string {
try {
const prefix = this.currJob.payload.urlSlug
? `${this.currJob.payload.urlSlug}/${this.currJob.payload.prefix}`
: this.currJob.payload.prefix;
if (this.currJob.payload.newHead && this.currJob.payload.action == 'automatedTest') {
return `${prefix}/${this.currJob.payload.newHead}`;
if (this.currJob.payload.prefix && this.currJob.payload.prefix === '') {
return this.currJob.payload.urlSlug ?? '';
}
if (this.currJob.payload.urlSlug) {
if (this.currJob.payload.urlSlug === '') {
return this.currJob.payload.prefix;
} else {
return `${this.currJob.payload.prefix}/${this.currJob.payload.urlSlug}`;
}
}
return prefix;
return this.currJob.payload.prefix;
} catch (error) {
this.logger.save(this.currJob._id, error).then();
throw new InvalidJobError(error.message);
}
// try {
// if (this.currJob.payload.prefix && this.currJob.payload.prefix === '') {
// return this.currJob.payload.urlSlug ?? '';
// }
// if (this.currJob.payload.urlSlug) {
// if (this.currJob.payload.urlSlug === '') {
// return this.currJob.payload.prefix;
// } else {
// return this.currJob.payload.prefix + `/${this.currJob.payload.urlSlug}`;
// }
// }

// return prefix;
// } catch (error) {
// this.logger.save(this.currJob._id, error).then();
// throw new InvalidJobError(error.message);
// }
}

private async purgePublishedContent(makefileOutput: Array<string>): Promise<void> {
Expand Down

0 comments on commit 20bf69c

Please sign in to comment.