From a7cd51c1421be5c435d14cd09894bb4df766e2ba Mon Sep 17 00:00:00 2001 From: Mohammad Ranjbar Z Date: Mon, 25 Sep 2023 17:10:50 +0330 Subject: [PATCH] Add logs for checkProjectVerificationStatus to can investigate better related to https://github.com/Giveth/impact-graph/issues/932#issuecomment-1733733608 --- .../cronJobs/checkProjectVerificationStatus.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/services/cronJobs/checkProjectVerificationStatus.ts b/src/services/cronJobs/checkProjectVerificationStatus.ts index 1ef37bd63..df386c956 100644 --- a/src/services/cronJobs/checkProjectVerificationStatus.ts +++ b/src/services/cronJobs/checkProjectVerificationStatus.ts @@ -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)); @@ -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 ( @@ -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 });