Skip to content

Commit

Permalink
poll less often for unread_count
Browse files Browse the repository at this point in the history
closes: USERS-193

a while ago I did some work to poll the unread_count less often but
we decided even that was more than we needed and this is, by far, the
Most frequently hit endpoint to our app servers. This change changes
The polling interval from 60 seconds to 120 seconds (2 minutes)

Which means that as long as you have a canvas page up in your browser,
Every 2 minutes it will send an xhr request to know the number to put
In that little badge next to the inbox icon in the nav header:
Aka, this guy: https://cl.ly/4eb23d868886

Test plan:
* if you load canvas, it should poll less frequently for the unread
  Count and it should still work

flag=none

Change-Id: I3cd2708ed04f12c97432e6bbe89db41d06fa4224
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220600
Tested-by: Jenkins
Tested-by: Service Cloud Jenkins <[email protected]>
Reviewed-by: Charley Kline <[email protected]>
QA-Review: Ryan Shaw <[email protected]>
Product-Review: Ryan Shaw <[email protected]>
  • Loading branch information
ryankshaw committed Dec 17, 2019
1 parent 5da8b40 commit 0c49ecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/jsx/navigation_header/UnreadCounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {ScreenReaderContent, PresentationContent} from '@instructure/ui-a11y'
import {defaultFetchOptions} from '@instructure/js-utils'
import I18n from 'i18n!UnreadCounts'

const DEFAULT_POLL_INTERVAL = 60000
const DEFAULT_POLL_INTERVAL = 120000

function storageKeyFor(url) {
const m = url.match(/\/api\/v1\/(.*)\/unread_count/)
Expand Down

0 comments on commit 0c49ecb

Please sign in to comment.