From 889a4e219f68f1b2880fb9448218caa9059d1809 Mon Sep 17 00:00:00 2001 From: dspeck1 Date: Tue, 18 Feb 2025 13:49:32 -0600 Subject: [PATCH] Convert position to string due to redis streams not supporting lists. --- src/main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index 9296e22..c16493a 100644 --- a/src/main.py +++ b/src/main.py @@ -32,7 +32,7 @@ class NextVisitModel: instrument: str groupId: str coordinateSystem: int - position: list[float] + position: str #TODO check if list allowed after testing. startTime: float rotationSystem: int cameraAngle: float @@ -99,6 +99,7 @@ def add_detectors( for active_detector in active_detectors: temp_message = message.copy() temp_message["detector"] = active_detector + temp_message["position"] = str(message["position"]) #TODO cleanup after redis testing # temporary change to modify short filter names to format expected by butler if temp_message["filters"] != "" and len(temp_message["filters"]) == 1: temp_message["filters"] = ( @@ -407,14 +408,12 @@ def dispatch_fanned_out_messages_redis_stream( """ try: for fan_out_message in send_info.fan_out_messages: - data = fan_out_message - print(type(data)) task = asyncio.create_task( redis_stream_request( redis_client, redis_stream, - data, + fan_out_message, ) ) tasks.add(task)