Skip to content
Snippets Groups Projects
Commit 7afcde58 authored by Jonas's avatar Jonas
Browse files

Pylint fixes

parent 95d3b39d
No related branches found
No related tags found
1 merge request!29Resolve "Initial Publish uptime of CS instance to IS"
Pipeline #781580 failed
#!/usr/bin/env tdaq_python #!/usr/bin/env tdaq_python
import logging
import threading import threading
import psutil import psutil
from datetime import datetime from datetime import datetime
...@@ -65,9 +64,9 @@ class InfoServiceThread(threading.Thread): ...@@ -65,9 +64,9 @@ class InfoServiceThread(threading.Thread):
def send_update(self): def send_update(self):
try: try:
self.logger.debug("Getting state from IS") self.logger.debug("Getting state from IS")
data_identifier = "{}.CastorScriptState".format(self.conf.partition)
cs_state = ispy.ISInfoDynAny() cs_state = ispy.ISInfoDynAny() #pylint: disable=no-member
self.is_info_dictionary.getValue("{}.CastorScriptState".format(self.conf.partition), cs_state) self.is_info_dictionary.getValue(data_identifier, cs_state)
cs_state.tdaq_app_name = self.tdaq_app_name cs_state.tdaq_app_name = self.tdaq_app_name
cs_state.uptime_seconds = self.uptime_seconds cs_state.uptime_seconds = self.uptime_seconds
...@@ -75,6 +74,6 @@ class InfoServiceThread(threading.Thread): ...@@ -75,6 +74,6 @@ class InfoServiceThread(threading.Thread):
keep_history = True keep_history = True
self.is_info_dictionary.checkin(data_identifier, self.cs_state, keep_history) self.is_info_dictionary.checkin(data_identifier, self.cs_state, keep_history)
self.logger.debug("Update sent: {}".format(cs_state)) self.logger.debug("Update sent: %s", str(cs_state))
except Exception as ex: except Exception as ex:
self.logger.warning("Error occured while trying to change cs_state to tdaq_app_name={} uptime_seconds={}. Error was: {}".format(self.tdaq_app_name, self.uptime_seconds, ex)) self.logger.warning("Error occured while trying to change cs_state to tdaq_app_name=%s uptime_seconds=%d. Error was: %s",self.tdaq_app_name, self.uptime_seconds, str(ex))
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