ulnagar / Constellation

0 stars 0 forks source link

Absence Monitor - Move notifications to a secondary action #80

Open ulnagar opened 7 months ago

ulnagar commented 7 months ago

Absence Monitor job currently does too much. It scans Sentral for absences, matches them against the database, creates new absences if necessary, and then sends notifications to relevant parties (students, parents, or schools).

Instead, move the absence notifications to a separate process. An outbox message that can be triggered out of process and will send notifications as necessary.

E.g. A message that notifications are required for a student and date. Processor then pulls all absences for that period. Sorts them into whether they need to go to the student, the parent, or the school Then sends the relevant notifications via the required manner.

The main Absence Monitor would therefore only be responsible for MONITORING ABSENCES.