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

feat: live database updates #661

Closed
wants to merge 20 commits into from
Closed

Conversation

BerkieBb
Copy link
Contributor

@BerkieBb BerkieBb commented Jan 14, 2025

Description

This PR introduces Live Database Updates. It changes how player data is updated by making sure only the any updated playerdata field is updated specifically in the database each 15 seconds (configurable). This is not directly live, but live enough to ensure data gets updated fast.

I also cleaned up the codebase a bit with this PR.

I have tested this myself and fixed bugs along but it's best to make sure this gets tested with others as well. However don't test in production until a few have tested in a test environment.

This also adds 2 new events that will be triggered from SetPlayerData in qbx_core/server/player.lua
qbx_core:client:setPlayerData
qbx_core:server:setPlayerData

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

@BerkieBb
Copy link
Contributor Author

Ah damnit now it created a 2-space gap in between

@ChatDisabled
Copy link
Member

Look I get it. But I have to agree with the team that this is just aids to read through. Pretty please open separate PRs, preferably one big style: first so we can immediately merge it. And then from there apply your changes. Trying to tell server owners to test this out is hard when they have to scroll 10 pages before finding a relevant line change.

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

Successfully merging this pull request may close these issues.

4 participants