-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix(client.command.cryo_card): Catch EPICS timeout on read and retry. #794
Conversation
I think we may want to test this... PVs in the smurf_command module use a 10 second timeout, so a retry happens roughly every 10 sec. We may want to implement the same thing here; as things are now I believe retries will happen immediately which I don't think we want. |
d375289
to
c5d50c5
Compare
OK, I've added a timeout between restarts and I can try it out on a test system at SLAC this afternoon. Just to confirm that it is retrying as expected when it can't reach the cryo card. However I'm not sure how to determine the appropriate number of retries or time in between. Currently it's set to retry 5 times, at 5s intervals. |
Alright so I've tested
However, after those attempts it returns a nonsense value, which is just how the code is designed. |
I'm confused how this is working, shouldn't the I think instead of manually sleeping, it makes more sense to set the timeout in the epics get fn, like here: pysmurf/python/pysmurf/client/command/smurf_command.py Lines 208 to 211 in 1ff6632
5 sec timeout with 5 retries sounds good to me as a default! |
yeah, that's a mistake...
ok |
c5d50c5
to
dde56c5
Compare
Also adds a timeout between retries and logging capability.
dde56c5
to
2697cfd
Compare
This is looking good to me... one more thing though, I think we should raise an exception on failure instead of just returning 0. Can we add that here? |
Yeah, I agree that makes a lot more sense. I wonder if that change may break other code that is relying on the current behaviour though. I guess I can have look and see. |
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, thanks!
@swh76 this one should also be merged for the next release |
Description
Addresses issue #792
Jira Issue
N/A
Tests done on this branch
It's a simple enough fix that that testing didn't seem necessary.
Function interfaces that changed
N/A
What was the interface before the change
N/A
What will be the new interface after the change
N/A