Skip to content

Commit

Permalink
revert jobs.ts changes to see if that helps
Browse files Browse the repository at this point in the history
  • Loading branch information
schmalliso committed Jun 8, 2023
1 parent 3f40174 commit 7a42511
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
18 changes: 9 additions & 9 deletions api/controllers/v1/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async function prepSummaryMessage(
failed = false
): Promise<string> {
const urls = extractUrlFromMessage(fullDocument);
let mms_urls = ['', ''];
let mms_urls = [null, null];
// mms-docs needs special handling as it builds two sites (cloudmanager & ops manager)
// so we need to extract both URLs
if (repoName === 'mms-docs') {
Expand Down Expand Up @@ -305,10 +305,10 @@ async function NotifyBuildProgress(jobId: string): Promise<any> {
const jobRepository = new JobRepository(db, c, consoleLogger);
// TODO: Make fullDocument be of type Job, validate existence
const fullDocument = await jobRepository.getJobById(jobId);
if (!fullDocument) {
consoleLogger.error('Cannot find job in db.', '');
return;
}
// if (!fullDocument) {
// consoleLogger.error('Cannot find job in db.', '');
// return;
// }
const jobTitle = fullDocument.title;
const username = fullDocument.user;
const repoEntitlementRepository = new RepoEntitlementsRepository(db, c, consoleLogger);
Expand Down Expand Up @@ -360,10 +360,10 @@ async function SubmitArchiveJob(jobId: string) {
branches: new BranchRepository(db, c, consoleLogger),
};
const job = await models.jobs.getJobById(jobId);
if (!job) {
consoleLogger.error('Cannot find job in db', JSON.stringify({ jobId }));
return;
}
// if (!job) {
// consoleLogger.error('Cannot find job in db', JSON.stringify({ jobId }));
// return;
// }
const repo = await models.branches.getRepo(job.payload.repoName);

/* NOTE
Expand Down
5 changes: 1 addition & 4 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ provider:
region: us-east-2
package:
patterns:
api/config/**
exclude:
- node_modules/**
- venv/**
api/config/*
custom:
serverlessPluginTypescript:
tsConfigFileLocation: '.api/tsconfig.build.json'
Expand Down

0 comments on commit 7a42511

Please sign in to comment.