Skip to content

Commit

Permalink
Add informative logs for draft donation service job (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadranjbarz authored May 7, 2024
1 parent 0f6aa94 commit 2f8ac5c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/services/cronJobs/draftDonationMatchingJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ export const runDraftDonationMatchWorkerJob = () => {
});

setInterval(async () => {
const count = await DraftDonation.countBy({
status: DRAFT_DONATION_STATUS.PENDING,
});
logger.debug('Pending Draft Donations count:', { count });
try {
logger.debug('Pending Draft Donations count: before execute the count query');

Check failure on line 34 in src/services/cronJobs/draftDonationMatchingJob.ts

View workflow job for this annotation

GitHub Actions / test

Replace `'Pending·Draft·Donations·count:·before·execute·the·count·query'` with `⏎········'Pending·Draft·Donations·count:·before·execute·the·count·query',⏎······`
const count = await DraftDonation.count({
where: {
status: DRAFT_DONATION_STATUS.PENDING,
},
});
logger.debug('Pending Draft Donations count:', { count });
} catch (e) {
logger.error('Pending Draft Donations count: Error', e);
}
}, TWO_MINUTES);
};

0 comments on commit 2f8ac5c

Please sign in to comment.