Skip to content

Commit

Permalink
Ignore nextVisit messages with no instrument.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
kfindeisen committed Jan 25, 2024
1 parent 2b5d982 commit f4bffc0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,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"][
Expand Down

0 comments on commit f4bffc0

Please sign in to comment.