added todo comment for modifying acknowledging logic at some point to allow input buffering to take effect

This commit is contained in:
Matthias Bisping 2022-05-24 14:39:39 +02:00
parent 298d8d3e2c
commit ab56c9a173

View File

@ -54,6 +54,11 @@ def make_callback(analysis_endpoint):
try:
data, metadata = itemgetter("data", "metadata")(body)
logging.debug(f"Requesting analysis from {endpoint}...")
# TODO: since data and metadata are passed as singletons, there is no buffering and hence no batching
# happening within the pipeline. However, the queue acknowledgment logic needs to be changed in order to
# facilitate passing non-singletons, to only ack a message, once a response is pulled from the output
# queue of the pipeline. Probably the pipeline return value needs to contains the queue message frame (or
# so), in order for the queue manager to tell which message to ack.
analysis_response_stream = pipeline([data], [metadata])
return analysis_response_stream
except Exception as err: