SIENTIAPDE-1110
Enhance logging in Ingestor class for subscription management - Added debug logging for subscribing to new slots, resubscribing to modified slots, and unsubscribing from removed slots in the Ingestor class.
This commit is contained in:
@@ -260,15 +260,18 @@ class Ingestor:
|
|||||||
|
|
||||||
for slot, config in new_managed_tags.items():
|
for slot, config in new_managed_tags.items():
|
||||||
if slot not in old_managed_tags:
|
if slot not in old_managed_tags:
|
||||||
|
self.logger.debug("Subscribing to new slot %s", slot)
|
||||||
self.ingestor_manager.subscribe_to_tags({slot: config})
|
self.ingestor_manager.subscribe_to_tags({slot: config})
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if config != old_managed_tags[slot]:
|
if config != old_managed_tags[slot]:
|
||||||
|
self.logger.debug("Resubscribing to slot %s", slot)
|
||||||
self.ingestor_manager.unsubscribe_slot(slot)
|
self.ingestor_manager.unsubscribe_slot(slot)
|
||||||
self.ingestor_manager.subscribe_to_tags({slot: config})
|
self.ingestor_manager.subscribe_to_tags({slot: config})
|
||||||
|
|
||||||
for slot in old_managed_tags.keys():
|
for slot in old_managed_tags.keys():
|
||||||
if slot not in new_managed_tags:
|
if slot not in new_managed_tags:
|
||||||
|
self.logger.debug("Unsubscribing from slot %s", slot)
|
||||||
self.ingestor_manager.unsubscribe_slot(slot)
|
self.ingestor_manager.unsubscribe_slot(slot)
|
||||||
|
|
||||||
# Ensure the gauge is updated after any potential changes here
|
# Ensure the gauge is updated after any potential changes here
|
||||||
|
|||||||
Reference in New Issue
Block a user