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

Server Heartbeat #382

Open
wants to merge 7 commits into
base: 2024-2-nyx
Choose a base branch
from
Open

Conversation

mskinner5278
Copy link
Collaborator

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.

@mskinner5278 mskinner5278 self-assigned this May 23, 2024
@JunAishima
Copy link
Collaborator

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

@@ -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")
Copy link
Collaborator

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

Copy link
Collaborator Author

@mskinner5278 mskinner5278 May 23, 2024

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

d4adae8

daq_main_common.py Outdated Show resolved Hide resolved
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):
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

mskinner5278 and others added 2 commits May 23, 2024 14:07
Co-authored-by: Jun Aishima <jaishima@bnl.gov>
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

Successfully merging this pull request may close these issues.

2 participants