Skip to content

Commit

Permalink
Remove time logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielrindlaub committed Jan 4, 2025
1 parent 81a5ec5 commit 0ef35b3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/api/db/models/Image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ export class ImageModel {
}
const s3 = new S3.S3Client({ region: process.env.AWS_DEFAULT_REGION });

console.time('delete-images total');
console.time('delete-images mongo records');
const images = await Image.find({ _id: { $in: input.imageIds! } });

if (images.length !== 0) {
Expand Down Expand Up @@ -196,12 +194,10 @@ export class ImageModel {
} finally {
// Ending the session
await session.endSession();
console.timeEnd('delete-images mongo records');
}
}

const keys: { Key: string }[] = [];
console.time('delete-images s3 records');
input.imageIds!.forEach((id) => {
const image = images.find((i) => idMatch(i._id, id));
['medium', 'original', 'small'].forEach((size) => {
Expand All @@ -214,8 +210,6 @@ export class ImageModel {
Delete: { Objects: keys },
}),
);
console.timeEnd('delete-images s3 records');
console.timeEnd('delete-images total');

return {
isOk: s3Res.Errors === undefined || s3Res.Errors.length === 0,
Expand Down

0 comments on commit 0ef35b3

Please sign in to comment.