-
Notifications
You must be signed in to change notification settings - Fork 6
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
Biologic driver changes for 0.2.x #78
Conversation
Move logger message to avoid using dt variable before it is defined
- Implement KBIO_api_wrapped class for use in 'with' statements to handle connection errors. - Adjust get_status, get_data, start_job, and stop_job methods to attempt 120 times before failure. - Reduce API connection timeout to 1 second. - Remove filelock as it did not help with disconnect, caused other issues. - Add logging to help debugging of disconnect problem. The jobs are now more robust against errors. Known issue: we have seen the API disconnect with a "successful" exit code much earlier than expected. It is still not clear why this is happening - further investigation needed.
- get_status randomly returns 0 for all attributes when there are many api calls - add check for firmware version to see if get_status is working correctly, otherwise retry - refactor the data_poller loop - use get_data instead of get_status for checking run status in data_poller loop Additionally: - add warning for channel memory saturation - lower several logging severity to DEBUG - give log message when stopping data polling
Does not change anything functionally, but looks more sensible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Graham, looks nice. I didn't give it a super-thorough read (that will have to wait until the end of next week), but this should give you something to do in the meantime, if you have the time.
You should also add yourself to the code contributors in the toplevel README.md
, in the toplevel setup.py
file, and also here:
tomato/src/tomato/drivers/biologic/__init__.py
Lines 97 to 98 in badda59
.. codeauthor:: | |
Peter Kraus |
Also, please, run the codebase through black
.
Remove from setup, remove lockpath from function signatures, remove from config requirements
Also moved connection logs to __enter__ and __exit__ functions of KBIO_api_wrapped
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @g-kimbell, nice work, just a few small things, shouldn't take too long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks. Let me know if you think it's ready to merge or if there's anything else that you'd like to do here!
Hi Peter, great, I think this is ready to merge then. |
Feel free to open a new PR into the same branch, if you'd like it in the |
Several fixes to improve stability of jobs running on a Biologic MPG2.
The main changes are: