Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Monthly Reminder Service #181

Closed

Conversation

mayura-andrew
Copy link
Member

Purpose

The purpose of this PR is to fix #176

This issue involves enhancing the EmailReminderService to ensure that email reminders are scheduled and processed correctly, with proper handling of retries and failures.

Goals

  1. Implement a robust EmailReminderService that schedules and processes email reminders.
  2. Handle maximum retries by logging and saving failed reminders.
  3. Improve the overall reliability and maintainability of the reminder service.

Approach

Screenshots

Checklist

  • This PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.
  • I have read and understood the development best practices guidelines ( http://bit.ly/sef-best-practices )
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Related PRs

Test environment

Learning

mayura-andrew and others added 30 commits July 14, 2024 20:28
Instead of directly passing individual fields to the updateProfile function, refactor the logic to use a single updateData object. This object contains the updated fields for the profile, such as primary_email, first_name, last_name, and image_url. This change improves code readability and maintainability.

Related to sef-global#165
- Moved monthly checking service functions to a dedicated service file (monthlyChecking.service.ts).
- Moved monthly checking controller functions to a dedicated controller file (monthlyChecking.controller.ts).
- Updated import paths and references to reflect the new file structure.
- Improved code organization and maintainability by separating concerns.
@mayura-andrew mayura-andrew marked this pull request as draft November 6, 2024 16:51
@mayura-andrew mayura-andrew marked this pull request as ready for review November 13, 2024 07:45
@@ -56,6 +56,7 @@
"@types/jsonwebtoken": "^9.0.2",
"@types/multer": "^1.4.11",
"@types/node": "^20.1.4",
"@types/node-cron": "^3.0.11",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Suggested change
"@types/node-cron": "^3.0.11",


const today = new Date()
const todayDateString = today.toDateString()
console.log(todayDateString)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log(todayDateString)

})
.getMany()

console.log(newMentees)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log(newMentees)

@@ -8,5 +8,5 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
"include": ["src/**/*.ts", "test/", "jest.config.ts","mocks.ts"]
"include": ["src/**/*.ts", "test/", "jest.config.ts","mocks.ts", "src/migrations/1730893653817-MonthlyChecking.ts"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't include this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement monthly-checking reminder service
2 participants