Skip to content

Instantly share code, notes, and snippets.

@pizycki
Last active March 31, 2020 14:58
Show Gist options
  • Select an option

  • Save pizycki/89500cac809818268916ed4a34ca6a13 to your computer and use it in GitHub Desktop.

Select an option

Save pizycki/89500cac809818268916ed4a34ca6a13 to your computer and use it in GitHub Desktop.
Examiner updates his notification settings to receive reminder for every work 2 days early at 15:00 local time
RescheduleUcomingExaminerWorkNotifications(examinerId) =
Get examiner notification preferences
Get examiner upcoming work assignments
notifications = Calculate notifications for schedule
for each
date, time = take work assignment time
date = Find {n}-th day before assignment date
next notification date = date + time
Schedule notifications
Delete old notifications
OnExaminerWorkAssignmentChange =
Get examiner notification preferences
Get updated work assignment
notification = Calculate notification for schedule
Schedule notification
Delete old one
OnExaminerCentreChange =
newCentre = Get Examiner Centre from GIP
localCentre = Get Examiner Centre from local store
if centre.TimeZone <> examiner.LocalCentre then
command RescheduleUcomingExaminerWorkNotifications
Table
------
ID AssignmentId NotificationTime: DateTime Status: Sent|Failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment