Skip to content
Snippets Groups Projects

Resolve "Initial Publish uptime of CS instance to IS"

@@ -64,15 +64,18 @@ class InfoServiceThread(threading.Thread):
def send_update(self):
try:
self.logger.debug("Getting state from IS")
data_identifier = "{}.CastorScriptState".format(self.conf.partition)
cs_state = ispy.ISInfoDynAny() #pylint: disable=no-member
self.is_info_dictionary.getValue(data_identifier, cs_state)
cs_state.tdaq_app_name = self.tdaq_app_name
# Note that we have to specify the type here
cs_state = ISObject(self.ipc_partition,"RunParams.{}.State".format(self.tdaq_app_name), 'CastorScriptState')
if cs_state.exists():
cs_state.checkout()
print cs_state
else:
print(cs_state.name() + " does not exist")
cs_state.uptime_seconds = self.uptime_seconds
keep_history = True
self.is_info_dictionary.checkin(data_identifier, self.cs_state, keep_history)
cs_state.checkin()
self.logger.debug("Update sent: %s", str(cs_state))
except Exception as ex:
Loading