Repository: microsoft/PubSec-Info-Assistant

Issue:
Incorrect value in queue message
The value set in this line of code below, should be "text_enrichment_queued_count".

https://github.com/microsoft/PubSec-Info-Assistant/blob/0cc8d718308fcc1c4ca207b6957f1033e1cc8b6c/functions/FileLayoutParsingOther/__init__.py#L194


Discussion:
@georearl, please review this ticket. 

Resolving patch:
diff --git a/functions/FileLayoutParsingOther/__init__.py b/functions/FileLayoutParsingOther/__init__.py
--- a/functions/FileLayoutParsingOther/__init__.py
+++ b/functions/FileLayoutParsingOther/__init__.py
@@ -189,9 +189,9 @@ def main(msg: func.QueueMessage) -> None:
         
         statusLog.upsert_document(blob_name, f'{function_name} - chunking stored.', StatusClassification.DEBUG)   
         
-        # submit message to the enrichment queue to continue processing                
+        # submit message to the text enrichment queue to continue processing                
         queue_client = QueueClient.from_connection_string(azure_blob_connection_string, queue_name=text_enrichment_queue, message_encode_policy=TextBase64EncodePolicy())
-        message_json["enrichment_queued_count"] = 1
+        message_json["text_enrichment_queued_count"] = 1
         message_string = json.dumps(message_json)
         queue_client.send_message(message_string)
         statusLog.upsert_document(blob_name, f"{function_name} - message sent to enrichment queue", StatusClassification.DEBUG, State.QUEUED)    
diff --git a/functions/ImageEnrichment/__init__.py b/functions/ImageEnrichment/__init__.py
--- a/functions/ImageEnrichment/__init__.py
+++ b/functions/ImageEnrichment/__init__.py
@@ -158,7 +158,7 @@ def translate_text(text, target_language):
 def main(msg: func.QueueMessage) -> None:
     """This function is triggered by a message in the image-enrichment-queue.
     It will first analyse the image. If the image contains text, it will then
-    detect the language of the text and translate it to Target Language."""
+    detect the language of the text and translate it to Target Language. """
 
     message_body = msg.get_body().decode("utf-8")
     message_json = json.loads(message_body)
diff --git a/functions/TextEnrichment/__init__.py b/functions/TextEnrichment/__init__.py
--- a/functions/TextEnrichment/__init__.py
+++ b/functions/TextEnrichment/__init__.py
@@ -289,7 +289,7 @@ def requeue(response, message_json):
                 backoff * queued_count, max_seconds
             )
             queued_count += 1
-            message_json["enrichment_queued_count"] = queued_count
+            message_json["text_enrichment_queued_count"] = queued_count
             queue_client = QueueClient.from_connection_string(
                 azure_blob_connection_string,
                 queue_name=text_enrichment_queue,
@@ -299,7 +299,7 @@ def requeue(response, message_json):
             queue_client.send_message(message_json_str, visibility_timeout=backoff)
             statusLog.upsert_document(
                 blob_path,
-                f"{FUNCTION_NAME} - message resent to enrichment-queue. Visible in {backoff} seconds.",
+                f"{FUNCTION_NAME} - message resent to text enrichment-queue. Visible in {backoff} seconds.",
                 StatusClassification.DEBUG,
                 State.QUEUED,
             )       


Test patch: