-
Notifications
You must be signed in to change notification settings - Fork 17
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
Convert periodic dial update to asynchronous function #32
Comments
This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 3 days. |
@SasaKaranovic To "unfreeze" the dials, I do one manual API call and then all dials are updating again. Edit: Just re-looked at my code and saw that there are WAY more than 6 API calls. More like 20-ish.... But still, the Dials are freezing. |
@PlasticGhoul thanks for bringing this up. Regardless if you use this code with VU1 or some other service, I would highly recommend that you refactor your code for two reasons. |
@SasaKaranovic I noticed one thing though. Edit: Just wanted to make it clear that 20+ calls at the same time weren't my intention. There was a bug that tripled each of my calls :D |
The VU server will accept as many requests as it can and updates the "internal" dial state. For posterity sake; This issue refers to the situation that occur where server is updating the dials and it receives another request at the exact same time. Because of this the request would still be processed but the server would have the delay (~ie 100ms) before it sends back the response. Changing the dial update to be asynchronous would potentially avoid this and make request-response timing more consistent. |
Currently dials values are being updated periodically inside
PeriodicCallback
functionVU-Server/server.py
Line 643 in 006b34f
VU-Server/server_dial_handler.py
Lines 39 to 53 in 006b34f
This function is synchronous which could prevent/delay the server from handling new requests.
The server should not have to wait for the dial update to be completed in order to handle new request since all requests are buffered and then periodically sent to dials.
Related to #31
The text was updated successfully, but these errors were encountered: