Skip to content
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

Leaderboard updates don't trigger correctly #2500

Closed
BlackYps opened this issue Jan 2, 2022 · 5 comments
Closed

Leaderboard updates don't trigger correctly #2500

BlackYps opened this issue Jan 2, 2022 · 5 comments

Comments

@BlackYps
Copy link
Collaborator

BlackYps commented Jan 2, 2022

We use a listener on the player rating to trigger updates of the leaderboard ui. The problem is that the league service takes a moment to update the league data. So when the update triggers on rating change it may still see only the old information, so to the user it looks like no update happened.
I am not sure how we can best fix this. At the moment there are no properties in the client that reflect the league score that we could listen to. The server sends rating updates, but doesn't know anything about leagues. At the moment the client has no way of knowing when the league scores have changed.

@BlackYps BlackYps added the bug label Jan 2, 2022
@Sheikah45
Copy link
Member

There is not really a good way to fix this unless there was a message to request the current stats. How big of a problem is this? If this is regarding specifically the logged in player's info I would just reload the info for that player specifically each time on load of the tab maybe. But would need to make sure that would cause too much load on the api.

@BlackYps
Copy link
Collaborator Author

BlackYps commented Jan 3, 2022

It's not that big of a deal. After the second game you will see the update of the previous games, so it lags behind one game, but it does update.
The league service can send out rabbitmq messages (not yet, but it is easy to implement because the foundation is already there). These should be used to trigger updates. I don't know if it is feasible to let the client listen to rabbitmq messages. Maybe the server would have to do that and send a message to the appropriate client.

@Sheikah45
Copy link
Member

So is this actually a problem that we will solve at some point in the future or is it fine as is and this can be closed?

@BlackYps
Copy link
Collaborator Author

Depends on how you want to use issues I guess. It is definitely not completely working. On the other hand I have noticed that sometimes the update triggers correctly. Presumably because the league service handles it fast enough. Either way, the problem is small enough that it is not really affecting anything. I won't be working on a fix in the near future.
We could either leave the issue open to document that there is a known bug here, or close it because it won't be fixed soon anyway.

@Sheikah45
Copy link
Member

There will be a lag in score updates

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

No branches or pull requests

2 participants