Skip to content

Commit

Permalink
DOP-4599 logging
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Jun 6, 2024
1 parent dbf9c6e commit e063139
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions api/controllers/v1/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,15 @@ export const DeployRepo = async (event: any = {}): Promise<any> => {
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(
Expand Down
2 changes: 1 addition & 1 deletion src/repositories/baseRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit e063139

Please sign in to comment.