Skip to content

Commit

Permalink
Fix/enable logging recommendations (#219)
Browse files Browse the repository at this point in the history
* Enabling logging on recommendations

* Adding identfier
  • Loading branch information
DDZBX authored Oct 15, 2024
1 parent a917014 commit 1069a44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/user-profiles/user-profiles.service.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
import fs from 'fs';
import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/sequelize';
Expand Down Expand Up @@ -538,6 +539,12 @@ export class UserProfilesService {
],
},
],
logging: (sql, timing) => {
console.log('Recommendations SQL query:');
console.log(sql);
console.log(timing);
},
benchmark: true,
});

const sortedProfiles = _.orderBy(
Expand Down

0 comments on commit 1069a44

Please sign in to comment.