Skip to content

Commit

Permalink
Convert position to string due to redis streams not supporting lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
dspeck1 committed Feb 18, 2025
1 parent 763e53c commit 889a4e2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"] = (
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 889a4e2

Please sign in to comment.