Skip to content

Commit

Permalink
Merge pull request #1135 from Giveth/add_logs_for_update_reminder
Browse files Browse the repository at this point in the history
Add logs for checkProjectVerificationStatus to can investigate better
  • Loading branch information
mohammadranjbarz authored Sep 26, 2023
2 parents 27ae61d + a7cd51c commit 3994472
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 3994472

Please sign in to comment.