Event notifications are delayed
Where did this happen?
Hosted (app.compasscalendar.com)
Expected Behavior
Changes to a user's Google Calendar are immediately synced to Compass with only a minor delay.
Events that are visible in my Google Calendar should be visible in Compass, given that they're from the primary calendar
Current Behavior
Changes to a user's Google Calendar aren't immediately synced. Instead, they are batched and only occur after subsequent changes to the user's Google Calendar.
Steps to Reproduce
- Create a recurring event in Google Calendar
- Wait for the sync to expire (?). (I'm not sure if this is the cause of the issue or not)
- Look at Compass week view
- Expected: Event series is visible
- Actual: Event is not visible
- Sign out of Compass
- Sign in to Compass
Confirming bug:
- Make change to the series in GCal
- Expected: Compass receives webhook notification from Gcal and updates its event
- Actual: No notification from Gcal
Possible Solution
Unsure. Why isn't the first change being updated? Google API warns that it batches changes, but if there's a long delay between batches, we might need to proactively fetch or find a different solution.
Context
When an event change is delayed for such a long time, it gives the impression that the change was missed. Having to rely on the user making multiple calendar changes in order to catch the first is unsustainable, as the user will assume that something is broken after the first and give up on Compass altogether.
Possible causes
- nextSyncToken has gotten outdated
- Changes were missed during frequent sign ins/outs
May be DST related