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

Optimistic state logic issue #14

Open
peteruithoven opened this issue Jan 19, 2016 · 2 comments
Open

Optimistic state logic issue #14

peteruithoven opened this issue Jan 19, 2016 · 2 comments

Comments

@peteruithoven
Copy link
Member

There is logic added to override the state, to optimistically assume the printer will start printing for example. But the following line prevents the api from correcting the state when this optimistic assumption was wrong.
https://github.com/Doodle3D/Doodle3D-cura-plugin/blob/master/PrinterConnection.py#L377

I would try to release the state before doing the http request
https://github.com/Doodle3D/Doodle3D-cura-plugin/blob/master/PrinterConnection.py#L351
This would allow the api to correct the state, after an override, when it starts a new request.

@Mzt-t
Copy link
Contributor

Mzt-t commented Jan 19, 2016

There's another place where the statelock gets released:
https://github.com/Doodle3D/Doodle3D-cura-plugin/blob/master/PrinterConnection.py#L224

I've been thinking about putting the releasestatelock in a more logical place but haven't come up with the best place yet.

@peteruithoven
Copy link
Member Author

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

2 participants