diff --git a/python/lsst/ts/rubintv/background/currentpoller.py b/python/lsst/ts/rubintv/background/currentpoller.py index f37930f..2dfee30 100644 --- a/python/lsst/ts/rubintv/background/currentpoller.py +++ b/python/lsst/ts/rubintv/background/currentpoller.py @@ -61,6 +61,11 @@ async def clear_todays_data(self) -> None: self._night_reports = {} async def check_for_empty_per_day_channels(self) -> None: + """Creates a store of channel prefixes for per-day data that's not + been received over the course of a day's polling. The prefixes use the + date that's been rolled over from, i.e. yesterday's date, to continue + to look for that data into the new day. + """ for location in self.locations: # clear out yesterday's stash self._yesterday_prefixes[location.name] = [] @@ -123,6 +128,20 @@ async def poll_buckets_for_todays_data(self, test_day: str = "") -> None: logger.exception("Caught exception during poll for data") async def poll_for_yesterdays_per_day(self, location: Location) -> None: + """Uses the store of prefixes for yesterday's missing per-day data to + poll for new objects that have maybe been delayed in processing (this + will mainly be movies) and didn't appear in the bucket before the day + rolled over. + Multiple objects will be ignored except for the most recent. + If an object is found in the bucket, the current page is notified. + Note: This does not effect historical pages. + + + Parameters + ---------- + location : Location + A given location. + """ client = self._s3clients[location.name] found = [] for prefix in self._yesterday_prefixes.get(location.name, []): diff --git a/tests/background/currentpoller_test.py b/tests/background/currentpoller_test.py index 3caffaf..da130b5 100644 --- a/tests/background/currentpoller_test.py +++ b/tests/background/currentpoller_test.py @@ -79,7 +79,6 @@ async def test_poll_buckets_for_today_process_and_store_seq_events( await current_poller.poll_buckets_for_todays_data() mocked_objs_keys = rubin_data_mocker.events.keys() - print(mocked_objs_keys) # make sure the keys for the location/cameras match up current_keys = sorted([k for k in current_poller._events.keys()])