Skip to content

Commit

Permalink
Convert position to string because lists not supported by redis streams.
Browse files Browse the repository at this point in the history
  • Loading branch information
dspeck1 committed Dec 23, 2024
1 parent 6c8d124 commit bba573b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class NextVisitModel:
groupId: str
coordinateSystem: int
#position: typing.List[int]
#position: str #TODO check if list allowed after testing.
position: str #TODO check if list allowed after testing.
startTime: float
rotationSystem: int
cameraAngle: float
Expand Down Expand Up @@ -65,6 +65,7 @@ def add_detectors(
message_list: list[dict[str, str]] = []
for active_detector in active_detectors:
temp_message = message.copy()
temp_message["position"] = str(message["position"]) #TODO cleanup after redis testing
temp_message["detector"] = active_detector
# temporary change to modify short filter names to format expected by butler
if temp_message["filters"] != "" and len(temp_message["filters"]) == 1:
Expand Down Expand Up @@ -294,7 +295,7 @@ async def main() -> None:
coordinateSystem=next_visit_message_initial["message"][
"coordinateSystem"
],
#position=next_visit_message_initial["message"]["position"],
position=next_visit_message_initial["message"]["position"],
startTime=next_visit_message_initial["message"]["startTime"],
rotationSystem=next_visit_message_initial["message"][
"rotationSystem"
Expand Down

0 comments on commit bba573b

Please sign in to comment.