mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
1.5 KiB
1.5 KiB
sis-updater-worker
Highlevel overview of the data flow
- The worker listens on one of the following channel:
SIS_UPDATER_SCHEDULE_CHANNELSIS_PURGE_CHANNELSIS_INFO_CHANNELSIS_MISC_SCHEDULE_CHANNEL
- Each time a message comes on one of the channels, the worker does the following:
- If the message comes in
SIS_PURGE_CHANNELand the message is for prepurge, the worker just counts how many entities are to be purged in the upcoming purge and sends back to scheduler a message with that count - If the message comes in
SIS_PURGE_CHANNELand the message is for purge, the worker deletes all the entities that were not updated before thebeforedate specified in the message, and sends the acknowledgement back to scheduler - If the message comes in
SIS_UPDATER_SCHEDULE_CHANNEL, the worker fetches the entities from the importer database based onentityIdsreceived in the message, mangles the data as needed and saves it into Oodikone database - If the message comes in
SIS_MISC_SCHEDULE_CHANNEL(which means that the scheduler requests to update student information for certain student numbers), the worker first purges the students based on the ids provided in the message and then run the same update logic as in the point above. - If the messages comes in
SIS_INFO_CHANNEL, the message is either ment to abort already scheduled messages or to reset redis cache
- If the message comes in
- In most of the cases, once the worker is done processing a message, it will send an acknowledgement back to the scheduler.