From a39a2729bcb93f824c507b92952cc7e7b8729cd0 Mon Sep 17 00:00:00 2001 From: Krzysztof Findeisen Date: Thu, 25 Jan 2024 15:45:02 -0800 Subject: [PATCH] Ignore nextVisit messages with no instrument. Such messages are created by summit scripts that don't take observations (e.g., a standalone telescope slew command), and they confuse Prompt Processing (which assumes that having the wrong instrument is a serious error). --- src/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.py b/src/main.py index c1ae7ef..01184a5 100644 --- a/src/main.py +++ b/src/main.py @@ -253,6 +253,11 @@ async def main() -> None: logging.info(f"message deserialized {next_visit_message_initial}") + if not next_visit_message_initial["message"]["instrument"]: + logging.info("Message does not have an instrument. Assuming " + "it's not an observation.") + continue + next_visit_message_updated = NextVisitModel( salIndex=next_visit_message_initial["message"]["salIndex"], scriptSalIndex=next_visit_message_initial["message"][