-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the stopwatches to the eventsource stream #14588
Conversation
Use the /user/events eventsource to update the stopwatches instead of polling /api/v1/user/stopwatches if the eventsource is enabled. Signed-off-by: Andrew Thornton <art27@cantab.net>
@@ -75,6 +81,32 @@ loop: | |||
case <-shutdownCtx.Done(): | |||
go unregister() | |||
break loop | |||
case <-stopwatchTimer.C: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a little more efficient and happen in the modules/eventsource instead per uid.
I don't completely understand why this is polling in any case instead of looking for some change but moving the polling to /user/events will clean up the http log. |
|
actually I think it wasn't a local issue on your side - it was a real issue. I've fixed it now. Feel free to test again @6543 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can confirm that it now works smoothly
🚀 |
Use the /user/events eventsource to update the stopwatches
instead of polling /api/v1/user/stopwatches if the eventsource
is enabled.
Signed-off-by: Andrew Thornton art27@cantab.net