Skip to content
Snippets Groups Projects
Commit 596464a2 authored by Jan David Mol's avatar Jan David Mol
Browse files

Merge branch 'L2SS-1258-fix-unsubscription' into 'master'

Fix cleaning up event unsubscription maintenance

Closes L2SS-1258

See merge request !545
parents 693c1617 fef98208
Branches
Tags
1 merge request!545Fix cleaning up event unsubscription maintenance
...@@ -110,6 +110,7 @@ Next change the version in the following places: ...@@ -110,6 +110,7 @@ Next change the version in the following places:
# Release Notes # Release Notes
* 0.11.1 Fix event unsubscription in TemperatureManager
* 0.11.0 Added StationManager device * 0.11.0 Added StationManager device
* 0.10.0 Add `AntennaToSdpMapper` and fpga_sdp_info_* mapped attributes in `Antennafield` device * 0.10.0 Add `AntennaToSdpMapper` and fpga_sdp_info_* mapped attributes in `Antennafield` device
* 0.9.0 Statistics writer: moved the whole functionality to lofar-station-client repository * 0.9.0 Statistics writer: moved the whole functionality to lofar-station-client repository
......
0.11.0 0.11.1
...@@ -137,9 +137,16 @@ class TemperatureManager(LOFARDevice): ...@@ -137,9 +137,16 @@ class TemperatureManager(LOFARDevice):
super().configure_for_off() super().configure_for_off()
# unsubscribe from all events # unsubscribe from all events
for dev_attr in self.temp_error_attrs.values(): for attr_name in list(self.temp_error_attrs.keys()):
try:
dev_attr = self.temp_error_attrs[attr_name]
dev_attr.proxy.unsubscribe_event(dev_attr.subscription_id) dev_attr.proxy.unsubscribe_event(dev_attr.subscription_id)
del dev_attr except Exception as e:
raise Exception(
f"Failed to unsubscribe from event regarding device {dev_attr.proxy.dev_name()} attribute {attr_name}"
) from e
finally:
del self.temp_error_attrs[attr_name]
is_alarming_R = attribute( is_alarming_R = attribute(
dtype=bool, dtype=bool,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment