Skip to content

Commit

Permalink
chore: removed console logs and commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
HRemonen committed Oct 15, 2024
1 parent 01cf6ca commit b839630
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/server/services/summary/buildSummaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,6 @@ const buildSummaries = async (forceAll = false) => {

// Build summaries for each time period
for (const { start, end } of datePeriods) {
// console.time(`${start.toISOString()}-${end.toISOString()}`)

await sequelize.transaction(async transaction => {
// Delete old summaries for this period. Remember that summary dates are exact, we dont want to delete anything "in between".
await Summary.destroy({
Expand All @@ -565,8 +563,6 @@ const buildSummaries = async (forceAll = false) => {
separateOrgId: OPEN_UNIVERSITY_ORG_ID,
})
})

// console.timeEnd(`${start.toISOString()}-${end.toISOString()}`)
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/server/services/summary/getOrganisationSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,7 @@ const getCourseUnitSummaries = async ({ organisationId, startDate, endDate, tagI
// Each of courseUnits has the same groupId and groupSummaries (calculated from the group...) so we can do this:
const cu = courseUnits[0]

// cu.summary = sumSummaries(_.uniqBy(cu.groupSummaries, 'entityId'))
cu.summary = sumSummaries(cu.groupSummaries)

/* if (cu.courseCode === 'TKT10002') {
console.log(JSON.stringify(cu, null, 2))
} */

delete cu.dataValues.groupSummaries

return cu.toJSON()
Expand Down

0 comments on commit b839630

Please sign in to comment.