Skip to content

Commit

Permalink
Merge pull request #1906 from Giveth/feat/check_periodically_endaoment
Browse files Browse the repository at this point in the history
additional logger data
  • Loading branch information
kkatusic authored Jan 14, 2025
2 parents e8a7de5 + c7af69c commit 66e8cce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/services/cronJobs/checkAndUpdateEndaomentProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ export const runCheckAndUpdateEndaomentProject = async () => {

schedule(cronJobTime, async () => {
logger.debug('runCheckAndUpdateEndaomentProject() has been started');
logger.debug('ProjStatus.cancelled value:', ProjStatus.cancelled);
try {
// Fetch all projects with organizationId = 5
const projects = await Project.find({
where: { organizationId: 5, statusId: Not(ProjStatus.cancelled) },
});

logger.debug('Projects fetched:', {
count: projects.length,
projectIds: projects.map(p => p.id),
endaomentIds: projects.map(p => p.endaomentId).filter(Boolean),
});

for (const project of projects) {
try {
// Fetch details from Endaoment API
Expand Down

0 comments on commit 66e8cce

Please sign in to comment.