feature/DEVSU-2656 email notification#447
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #447 +/- ##
===========================================
+ Coverage 77.04% 77.07% +0.02%
===========================================
Files 183 183
Lines 6395 6399 +4
Branches 758 761 +3
===========================================
+ Hits 4927 4932 +5
+ Misses 1382 1379 -3
- Partials 86 88 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const job = await emailQueue.add('job', data, EMAIL_REMOVE_CONFIG); | ||
| try { | ||
| await db.models.notificationTrack.create({ | ||
| await db.models.notificationTrack.findOrCreate({where: { |
There was a problem hiding this comment.
I think this means a new record won't be created each time a notification is required - a new one is needed each time there's a new task because this table lets us track whether the queue is working. We should replace this with eg Arena for monitoring bullmq tasks - and clear out the backlog in this table - but in the meantime using findOrCreate here instead of create means the record is not useful.
There was a problem hiding this comment.
agree. it should use create instead of findOrCreate.
…gsc/pori_ipr_api into feature/DEVSU-2656-email-notification
DEVSU-2656: