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

Can't set weight mode via web interface anymore #5

Closed
yesrod opened this issue Jul 12, 2020 · 2 comments
Closed

Can't set weight mode via web interface anymore #5

yesrod opened this issue Jul 12, 2020 · 2 comments

Comments

@yesrod
Copy link
Owner

yesrod commented Jul 12, 2020

Something somewhere is stomping on the weight_mode setting when its set via the web interface.

I can change keg settings and they stick, but if I change keg setting plus weight_mode, everything reverts.

The shmem stuff is a mess anyway, may fix this by moving the web interface to using the API.

@yesrod yesrod closed this as completed in c0e53e4 Jul 12, 2020
@yesrod
Copy link
Owner Author

yesrod commented Jul 12, 2020

Partially addressed, found a bigger issue affecting the weight data

yesrod added a commit that referenced this issue Jul 12, 2020
- Fixes #6 by clearing hx_handles when running setup_all_kegs()
- #5 is more fixed by iterating through the hx_handles in a less stupid manner
  and making all the ShMem update stuff as quick as possible to minimize race
  condition issues
@yesrod
Copy link
Owner Author

yesrod commented Jul 12, 2020

More fixed; issue is related to a race condition in the update thread in the main hoplite module.

If the update thread reads the shmem, then the web interface commits a change between the shmem read and the update thread writing the shmem, that change is lost.

The issue has been minimized by shortening the time between shmem read and write in the update thread, but this won't be fully fixed until the web interface moves to the REST API and the shmem interface is deprecated.

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

No branches or pull requests

1 participant