-
Notifications
You must be signed in to change notification settings - Fork 14
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
Server Heartbeat #382
base: 2024-2-nyx
Are you sure you want to change the base?
Server Heartbeat #382
Conversation
you have reminded me that I was going to try to improve the LSDC server service so that it will try to restart in case it dies, and is able to restart if there isn't a chronic issue. I'll handle that in a separate issue - will have to be through ansible |
gui/control_main.py
Outdated
@@ -200,6 +200,8 @@ def __init__(self): | |||
|
|||
self.beamSize_pv = PV(daq_utils.beamlineComm + "size_mode") | |||
self.energy_pv = PV(daq_utils.motor_dict["energy"] + ".RBV") | |||
self.heartbeat_pv = PV("XF:19ID2-ES:NYX{Comm}server_heartbeat") |
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.
the PV name should be refactored somewhere, such as the config_params module. if this 2024-2-nyx branch is planned to be merged with AMX/FMX, then discussions should be had about the PV name to be used for those beamlines
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.
for now I have given it the same naming treatment as beamSize_pv above, if there is no PV in place then the feature will not be functional
while (1): | ||
if (len(immediate_command_list) > 0): | ||
command = immediate_command_list.pop(0) | ||
logger.info('immediate command: %s' % command) | ||
process_input(command) | ||
if memory_beat == beamline_support.pvGet(daq_lib.heartbeat): |
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.
is there any reason you couldn't have this in a separate thread or something? it seems unnecessarily tied to a particular function, and while this is unlikely, the checking interval for the process_immediate_functions()
could be set in such a way that the popup would always trigger.
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.
I only did it to minimize the creation of new threads, but if you think that is a non-issue then I can split it out.
Co-authored-by: Jun Aishima <jaishima@bnl.gov>
This is a utility for notifying the user of server failures. After 10 seconds of the client not finding a server, it will send a popup through the popup pv.