Improvements to Google Calendar Availability Display Performance
We are improving the cache mechanism for `fetch_staff_events` and `fetch_org_hold_and_admin` from Google Calendar into Canvas scheduling. We are doing this by introducing two new tasks in the background:
`GOOGLE_CALENDAR_CACHE_REFRESH_INTERVAL_SECONDS`: This is a running job that auto updates the schedule view of each instance every designated number of seconds/minutes so that any changes on the Google calendar are reflected on Canvas. This is a Canvas developer configurable task, and will deploy to all prod instances at 5 minutes and to all non-prod instances at 15 minutes. The impact of this task is that with caching the Google events every 5 minutes, for prod instances, there will be improvement to the speed in which the availability information loads as the events are saved for 5 minutes and then reloaded again, which improves performance with less caching jobs running in the background.
`GOOGLE_CALENDAR_CACHE_NR_WEEKS`: This is the number of weeks for which the google event data will be "pre-loaded" from today (the day in which the user logs into Canvas). The number of weeks can be configured, and the improvement is that if a user logs into Canvas today and the NR_weeks is set to 4 weeks, then that users from today until 4 weeks from today will be able to see all google events in those 4 weeks automatically. This number of weeks can be configured by root users for each instances, and we will deploy as a default 4 weeks during release. If a user goes beyond the configured weeks then each day loading will be the same as it is today (where it takes some time to display that information). Ex. I log into Canvas today and can press "next day" until 2/26 and see the google events immediately rather than having to wait for the information to load, but once I get to 2/27 and beyond (or before today), I will need to wait for google events information to load (this is today's behavior).
These two configurations combined will improve how frequently the google events data is captured and allow for users to move between days without seeing the "Loading provider availability" as often. By improving the current mechanism and allowing for some user configuration, we will be removing slowness from the schedule view for all users.
Version 0.6.0 of Canvas Workflow Kit
In Version 0.6.0of our Canvas Workflow kit we added the following improvements:
To support ADT integration messages, we added a new CHANGE_TYPE.EXTERNAL_EVENTS and the self.patient object will now have a self.patient.external_events attribute that will capture the following info from an ADT integration message:
"visitFacility": "Test Facility",
2 .Added function create_task_payload to create Tasks in a protocol. See our documentation for more information
Please sign in to leave a comment.