feat(task-queue) Job scheduling with deadline reminder task#61
feat(task-queue) Job scheduling with deadline reminder task#61moffatethan wants to merge 8 commits into
Conversation
| to: toEmail, | ||
| from: 'ethanmoffat@hey.com', | ||
| subject: subject, |
There was a problem hiding this comment.
The from email usually shouldn't be the same as your personal email but I did this for testing purposes. This should be updated in a configuration file with a verified sender that you setup in your SendGrid.
| const mappedBoard = boards.map((board) => { | ||
| return { | ||
| name: board.name, | ||
| user: board.user, | ||
| cards: board.columns.map((col) => | ||
| col.cards.filter((card) => new Date().getDay() === new Date(card.dueDate).getDay()) | ||
| ).flat() | ||
| } | ||
| }); |
There was a problem hiding this comment.
Unfortunately, the way we designed our back-end this isn't the most efficient way of doing this. If we want to make this more efficient we should consider creating Card models as opposed to having everything as a a POJO.
There was a problem hiding this comment.
I agree; this could be discussed in a future meeting on how to approach our models issue
amahalwy
left a comment
There was a problem hiding this comment.
Left some comments but otherwise, looks good to me!
|
Holding off on a merge here because with the plans to refactor this implementation will need to adapt to the changes. |
What this PR does (required):
app.jsScreenshots / Videos (required):
Any information needed to test this feature (required):
brew install redisis my recommendation.initializeQueueoption which will automatically use localhost.Notes
I am still planning my approach to adding the cards to the job queue. However, I am thinking adding a route that the front-end can hit that passes down the card id. By doing this, the job processor can lookup the card directly and do it's check for deadlines and process accordingly. Furthermore, I would also create routes for removing a job from the queue (i.e., a card deadline is removed).
Any issues with the current functionality (optional):