Skip to content

Commit

Permalink
PLA-888
Browse files Browse the repository at this point in the history
  • Loading branch information
justraman committed Apr 18, 2023
1 parent acae843 commit c15d022
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/jobs/compute-traits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ traitsQueue.process(async (job, done) => {
.orIgnore()
.execute()
await em.remove(traitTokensToDelete)

await em
.createQueryBuilder()
.delete()
.from(TraitToken)
.where('traitToken.trait IN (:...traitsToDelete)', { traitsToDelete: traitsToDelete.map((t) => t.id) })
.execute()

await em.remove(traitsToDelete)

done(null, { timeElapsed: new Date().getTime() - start.getTime(), collectionId })
Expand Down

0 comments on commit c15d022

Please sign in to comment.