diff --git a/tangostationcontrol/tangostationcontrol/common/events.py b/tangostationcontrol/tangostationcontrol/common/events.py index 89028fef346361d1b2cc6967557009dc15c9f333..eac5e9c984418135cfa207b84d08fac0b90cc509 100644 --- a/tangostationcontrol/tangostationcontrol/common/events.py +++ b/tangostationcontrol/tangostationcontrol/common/events.py @@ -8,6 +8,7 @@ from prometheus_client import Counter from tango import DeviceProxy, EventType from tangostationcontrol.common.lofar_logging import log_exceptions +from tangostationcontrol.common.constants import DEFAULT_POLLING_PERIOD_MS from tangostationcontrol.metrics import AttributeMetric logger = logging.getLogger() @@ -87,11 +88,8 @@ class EventSubscriptions: # make sure the attribute is polled, otherwise we wont receive event if not proxy.is_attribute_polled(attr_name): - logger.error( - f"Error, no polling_period set for attribute \ - {proxy.name()}/{attr_name}. \ - We will not get any events without a polling_period" - ) + logger.info(f"Enabling polling for {proxy.name()}/{attr_name}.") + proxy.poll_attribute(attr_name, DEFAULT_POLLING_PERIOD_MS) # subscribe event_id = proxy.subscribe_event(