From f4b3753fb9aca64df033c9f8a096fb669b5ac9d4 Mon Sep 17 00:00:00 2001 From: ugyballoons Date: Thu, 11 Jul 2024 15:09:38 +0100 Subject: [PATCH] Tidy up as per PR suggestions --- python/lsst/ts/rubintv/background/historicaldata.py | 4 ++-- python/lsst/ts/rubintv/handlers/pages.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/python/lsst/ts/rubintv/background/historicaldata.py b/python/lsst/ts/rubintv/background/historicaldata.py index 482b05de..a46ecf9a 100644 --- a/python/lsst/ts/rubintv/background/historicaldata.py +++ b/python/lsst/ts/rubintv/background/historicaldata.py @@ -164,7 +164,7 @@ async def compress_events(self) -> None: async def store_events(self, events: list[Event], locname: str) -> None: logger.info("starting store_events") for event in events: - storage_key = await self.storage_key_for_event(event, locname) + storage_key = self.storage_key_for_event(event, locname) if storage_key not in self._temp_events: self._temp_events[storage_key] = [] self._temp_events[storage_key].append(event) @@ -185,7 +185,7 @@ async def store_events(self, events: list[Event], locname: str) -> None: self._calendar[loc_cam][year][month][day] = seq_num logger.info("ending store_events") - async def storage_key_for_event(self, event: Event, locname: str) -> str: + def storage_key_for_event(self, event: Event, locname: str) -> str: return f"{locname}/{event.camera_name}" async def download_and_store_metadata( diff --git a/python/lsst/ts/rubintv/handlers/pages.py b/python/lsst/ts/rubintv/handlers/pages.py index d576caa4..7c5e8488 100644 --- a/python/lsst/ts/rubintv/handlers/pages.py +++ b/python/lsst/ts/rubintv/handlers/pages.py @@ -47,7 +47,6 @@ async def get_home( request: Request, ) -> Response: """GET ``/rubintv/`` (the app's external root).""" - # logger.info("Request for the app home page") locations: list[Location] = request.app.state.models.locations if len(locations) < 2: location = locations[0] @@ -356,7 +355,7 @@ async def get_historical_night_report_page( "location": location, "camera": camera.model_dump(), "date": day_obs, - "night_report": (night_report.model_dump()), + "night_report": night_report.model_dump(), "historical_busy": historical_busy, "title": title, },