Skip to content
This repository has been archived by the owner on Feb 10, 2018. It is now read-only.

New registrations don't show up for around 15 minutes #10

Open
EliAndrewC opened this issue Sep 10, 2016 · 2 comments
Open

New registrations don't show up for around 15 minutes #10

EliAndrewC opened this issue Sep 10, 2016 · 2 comments

Comments

@EliAndrewC
Copy link
Contributor

A common thing people do is pick up their badge and then immediately head over to tabletop to check out a game.

This year we've found that we often don't see their badge in the system for at least 15 minutes, even after refreshing the browser. I suspect there's some sort of caching issue; browsers often cache things even when the headers say not to, so our Ajax request that loads the users might not be getting re-called even when we say to. And I don't think we're even setting any of those no-cache headers anyway.

@EliAndrewC
Copy link
Contributor Author

More testing has revealed that a full page refresh does consistently fix the issue. This issue should therefore still remain, and the fix is that users shouldn't have to refresh their browsers to see new attendees. (There should be a periodic background update, but I guess that got broken at some point.)

@binary1230
Copy link
Contributor

some quick notes from looking at it quickly:

the initial list of attendees is sent to the page via the {{ attendees }} variable, passed through django and written out to the html.

update() here will use AJAX to fetch the latest attendee data:

            update: function () {
                $http({
                    url: 'badged_attendees'
                }).then(function (response) {
                    self.set(response.data);
                })
            }

however, nothing appears to ever call this, so the data is fetched once at page load and then never again. since this page is an angular app, it never actually refreshes, so, the data is stale until the user manually refreshes the page.

The solution here is likely to ensure that update() gets called. Eli seems to think this used to be on a timer or something, but looking through the history I couldn't find anything in this plugin, or in the original ubersystem repo before it was moved into a plugin, so it's also possible this was broken and we never really noticed much before.

-Dom

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants