Skip to content

Commit

Permalink
Add logs for checkProjectVerificationStatus to can investigate better
Browse files Browse the repository at this point in the history
related to #932 (comment)
  • Loading branch information
mohammadranjbarz committed Sep 25, 2023
1 parent 285366b commit a7cd51c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/services/cronJobs/checkProjectVerificationStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ export const checkProjectVerificationStatus = async () => {
const projects = await projectsWithoutUpdateAfterTimeFrame(
maxDaysForSendingUpdateReminder,
);
logger.debug('checkProjectVerificationStatus()', {
maxDaysForSendingUpdateReminder,
foundProjectsCount: projects?.length,
});

// Run all iterations async, resulting in array of promises
await Promise.all(projects.map(remindUpdatesOrRevokeVerification));
Expand Down Expand Up @@ -150,6 +154,11 @@ const remindUpdatesOrRevokeVerification = async (project: Project) => {
}

await project.save();
logger.debug('remindUpdatesOrRevokeVerification() save project', {
projectId: project.id,
slug: project.slug,
verificationStatus: project.verificationStatus,
});

// draft the verification form to allow reapply
if (
Expand Down Expand Up @@ -180,6 +189,11 @@ const sendProperNotification = (
project: Project,
projectVerificationStatus: string,
) => {
logger.debug('sendProperNotification()', {
projectId: project.id,
slug: project.slug,
verificationStatus: project.verificationStatus,
});
switch (projectVerificationStatus) {
case RevokeSteps.Reminder:
return getNotificationAdapter().projectBadgeRevokeReminder({ project });
Expand Down

0 comments on commit a7cd51c

Please sign in to comment.