diff --git a/api/controllers/v1/slack.ts b/api/controllers/v1/slack.ts index 739d92084..c8080a81a 100644 --- a/api/controllers/v1/slack.ts +++ b/api/controllers/v1/slack.ts @@ -237,15 +237,15 @@ export const DeployRepo = async (event: any = {}): Promise => { if (deployable.length > 0) { try { console.log('deploying repos'); - await deployRepo(deployable, consoleLogger, jobRepository, c.get('jobsQueueUrl')); + deployRepo(deployable, consoleLogger, jobRepository, c.get('jobsQueueUrl')); + return { + statusCode: 200, + headers: { 'Content-Type': 'application/json' }, + }; } catch (e) { return prepResponse(401, 'text/plain', `${e} error deploying repos`); } } - return { - statusCode: 200, - headers: { 'Content-Type': 'application/json' }, - }; }; function createPayload( diff --git a/src/repositories/baseRepository.ts b/src/repositories/baseRepository.ts index da3e0091f..2d30e4156 100644 --- a/src/repositories/baseRepository.ts +++ b/src/repositories/baseRepository.ts @@ -34,10 +34,10 @@ export abstract class BaseRepository { this._collection.insertMany(docs), errorMsg ); + console.log(JSON.stringify(insertManyResult)); if (insertManyResult?.insertedIds) { return insertManyResult.insertedIds; } - console.log('returned null for insertMany??'); return null; } catch (error) { this._logger.error(`${this._repoName}:upsert`, `Failed to insert job (${JSON.stringify(docs)}) error: ${error}`);