Skip to content
Snippets Groups Projects
Commit 88268181 authored by BRONES Romain's avatar BRONES Romain
Browse files

fix: Check FofbIsRunning before running Utils method

parent a225ba68
No related branches found
No related tags found
No related merge requests found
......@@ -38,8 +38,13 @@ tangopath.update(tangopath_nodes)
def init_opcua():
"""
Run init on all OPCUA devices. Catch DevFailed and inform via log.
Does nothing if Fofb is running.
"""
if not check_fofbnotrunning():
logger.warning("Not running configuration of combpm because FOFB seems to be running.")
return
for i,(n,p) in enumerate(tangopath_nodes.items()):
logger.info("Perform init() on {} '{}'".format(n,p))
try:
......@@ -51,8 +56,13 @@ def init_opcua():
def init_watcher():
"""
Run init on Fofb-Watcher, waiting for its completion then init on the FofbCommand.
Does nothing if Fofb is running.
"""
if not check_fofbnotrunning():
logger.warning("Not running configuration of combpm because FOFB seems to be running.")
return
try:
wprx=tango.DeviceProxy(tangopath["fofb-watcher"])
wprx.set_timeout_millis(30000)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment