Open LunarFang416 opened 2 years ago
Are there some ideas you could get from here: https://stackoverflow.com/questions/54002431/how-to-trigger-events-in-node-js-when-a-future-date-time-stored-in-database-is
Do you think some polling approach could work where we have a single loop checking perhaps every minute across all projects for any upcoming TODO items, then send out appropriate notifications to students in the appropriate projects? Maybe polling one a minute or perhaps every 5 or 10 minutes if for some reason we want to reduce the number of DB calls?
Yeah thats a good Idea. Will work on this, this week. I think it will be easier to implement a listener in the backend which checks for any pending notifications after certain intervals.
Use the existing notificationService to generate notifications to remind students of their pending or overdue tasks. Send one notification the day before, and one notification the day a task is due. Also send a notification for an overdue task as well.