SIENTIAPDE-1151
refactor: enhance error handling in build_tag_config and slot processing to include notifications for missing servers
This commit is contained in:
@@ -118,14 +118,33 @@ class Formatters(BaseActivity):
|
||||
for i in range(1, number_of_slots):
|
||||
slot_config[f"{i}"] = {}
|
||||
for tag in tags[last_index:last_index + tags_per_slot]:
|
||||
slot_config = build_tag_config(
|
||||
tag, slot_config.copy(), opc_servers, i)
|
||||
try:
|
||||
slot_config = build_tag_config(
|
||||
tag, slot_config.copy(), opc_servers, i)
|
||||
except ValueError as e:
|
||||
self.send_notification(
|
||||
metadata=metadata,
|
||||
notification_id="ORCHESTRATOR_BUILD_TAG_CONFIG_ERROR",
|
||||
message=e,
|
||||
block="orchestrator",
|
||||
level=NotificationLevel.ERROR
|
||||
)
|
||||
|
||||
last_index += tags_per_slot
|
||||
|
||||
slot_config[f"{number_of_slots}"] = {}
|
||||
for tag in tags[last_index:]:
|
||||
slot_config = build_tag_config(
|
||||
tag, slot_config.copy(), opc_servers, number_of_slots)
|
||||
try:
|
||||
slot_config = build_tag_config(
|
||||
tag, slot_config.copy(), opc_servers, number_of_slots)
|
||||
except ValueError as e:
|
||||
self.send_notification(
|
||||
metadata=metadata,
|
||||
notification_id="ORCHESTRATOR_BUILD_TAG_CONFIG_ERROR",
|
||||
message=e,
|
||||
block="orchestrator",
|
||||
level=NotificationLevel.ERROR
|
||||
)
|
||||
|
||||
self.info("Processed slots", metadata=metadata)
|
||||
self.debug(json.dumps(
|
||||
|
||||
Reference in New Issue
Block a user