From 3e16ce7237b5ab7d91d0d010af57876b45b42681 Mon Sep 17 00:00:00 2001 From: stedif <stefano.difrischia@inaf.it> Date: Fri, 10 Sep 2021 17:34:31 +0200 Subject: [PATCH] L2SS-235: remove archiving code from device --- devices/devices/pcc.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/devices/devices/pcc.py b/devices/devices/pcc.py index 38b02a02c..eac4046f9 100644 --- a/devices/devices/pcc.py +++ b/devices/devices/pcc.py @@ -32,8 +32,6 @@ from clients.attribute_wrapper import attribute_wrapper from devices.hardware_device import hardware_device from common.lofar_logging import device_logging_to_python, log_exceptions from common.lofar_git import get_version -from common.lofar_environment import isProduction -from toolkit.archiver import Archiver __all__ = ["PCC", "main"] @@ -112,8 +110,6 @@ class PCC(hardware_device): RCU_translator_busy_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_translator_busy_R"], datatype=numpy.bool_) RCU_version_R = attribute_wrapper(comms_annotation=["2:PCC", "2:RCU_version_R"], datatype=numpy.str_, dims=(32,)) - test_att = RCU_temperature_R - @log_exceptions() def delete_device(self): """Hook to delete resources allocated in init_device. @@ -164,21 +160,6 @@ class PCC(hardware_device): self.OPCua_client.start() - # TODO(Stefano): check if all attributes are ready to be archived - # add an attribute for testing purpose - self.archiver = Archiver() # define a standard archiver - attr_name = str(self.get_name()+'/'+self.test_att.get_name()).lower() - if isProduction(): - # Add attribute to subscriber list if not already present - try: - result = self.archiver.check_attribute_in_archiving_list(attr_name) - self.debug_stream("ARCHIVING: %s added to archiving list" % result) - except Exception as e: - self.warn_stream("error while adding attributes to archiving list. {}".format(e)) - else: - # Remove attribute from subscriber list to prevent automatic archiving - self.archiver.remove_attribute_from_archiver(attr_name) - # -------- -- GitLab