diff --git a/api/controllers/v1/slack.ts b/api/controllers/v1/slack.ts index 6d852c298..7914c1a1d 100644 --- a/api/controllers/v1/slack.ts +++ b/api/controllers/v1/slack.ts @@ -83,7 +83,9 @@ export const DisplayRepoOptions = async (event: APIGatewayEvent): Promise, logger: ILogger, jobRepository: JobRepository, jobQueueUrl) { try { await jobRepository.insertBulkJobs(deployable, jobQueueUrl); + return; } catch (err) { + console.error('deploy repo error'); logger.error('deployRepo', err); } } @@ -235,6 +237,7 @@ export const DeployRepo = async (event: any = {}): Promise => { const deployable = await getDeployableJobs(values, entitlement, repoBranchesRepository, docsetsRepository); if (deployable.length > 0) { + console.log('deploying'); await deployRepo(deployable, consoleLogger, jobRepository, c.get('jobsQueueUrl')); } return { diff --git a/src/repositories/jobRepository.ts b/src/repositories/jobRepository.ts index 54c1464e4..7870dea78 100644 --- a/src/repositories/jobRepository.ts +++ b/src/repositories/jobRepository.ts @@ -71,7 +71,9 @@ export class JobRepository extends BaseRepository { // Insertion/re-enqueueing should be sent to jobs queue and updates for an existing job should be sent to jobUpdates Queue this._logger.info( 'insertBulkJobs', - `Total Jobs Expected : ${jobs.length}, Jobs: ${JSON.stringify(jobIds)}, Total Jobs Sent: ${jobIds.length}` + `Total Jobs Expected : ${jobs.length}, Jobs: ${JSON.stringify(jobIds)}, Total Jobs Sent: ${ + JSON.stringify(jobIds).length + }` ); await Promise.all( Object.values(jobIds).map(async (jobId: string) => {