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.
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.