beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
50 stars 47 forks source link

Deprecated: Add balance mode split one chevs (Updated) #248

Closed jauggy closed 5 months ago

jauggy commented 5 months ago

Fixes #218 See issue ticket for details and test instructions.

Incorporating changes suggested by geekingfrog from previous PR.

Dependency to Account module has been removed from the split one chevs balance algorithm. However, inside balancer_server there is a function that iterates over user ids and fetches user information. Previously this information was only rating. Now it includes name and rank. While in code this looks like a db call, it wouldn't be in production because it uses a cache after the data is fetched once. It would be fetched once during login.

loser_picks (written by Teifion) still has a dependency to Teiserver.Account and the reason why units tests pass is because Teifion is using

  use Teiserver.DataCase, async: true

which I think sets up a connection to the database during the test. I am not confident to change this module but can raise a ticket if needed. But as stated earlier, in production it would be using the cache not a db call.

jauggy commented 5 months ago

As requested I've moved the changes to the other PR