diff --git a/astropylibrarian/algolia/client.py b/astropylibrarian/algolia/client.py index c9390c4..2a23c19 100644 --- a/astropylibrarian/algolia/client.py +++ b/astropylibrarian/algolia/client.py @@ -82,16 +82,12 @@ async def __aexit__( await self.algolia_client.close() self._logger.debug("Finished closing algolia client") - async def browse_objects( - self, browse_params: BrowseParamsObject - ) -> BrowseResponse: + async def browse_objects(self, browse_params: BrowseParamsObject) -> BrowseResponse: return await self.algolia_client.browse_objects( index_name=self.name, aggregator=None, browse_params=browse_params ) - async def save_objects( - self, objects: list[dict[str, Any]] - ) -> list[BatchResponse]: + async def save_objects(self, objects: list[dict[str, Any]]) -> list[BatchResponse]: return await self.algolia_client.save_objects(self.name, objects) async def delete_objects(self, objectids: list[str]) -> list[BatchResponse]: @@ -148,9 +144,7 @@ async def browse_objects( for _ in range(5): yield {} - async def delete_objects( - self, objectids: list[str] - ) -> list[DeletedAtResponse]: + async def delete_objects(self, objectids: list[str]) -> list[DeletedAtResponse]: return [DeletedAtResponse(task_id=0, deleted_at="") for _ in objectids] diff --git a/astropylibrarian/workflows/expirerecords.py b/astropylibrarian/workflows/expirerecords.py index 2ce312b..356a193 100644 --- a/astropylibrarian/workflows/expirerecords.py +++ b/astropylibrarian/workflows/expirerecords.py @@ -36,7 +36,7 @@ async def expire_old_records( attributes_to_highlight=[], ) old_object_ids: List[str] = [] - async for r in algolia_index.browse_objects(obj): + for r in algolia_index.browse_objects(obj): # Double check that we're deleting the right things. if r["root_url"] != root_url: logger.warning("root_url does not match: %s", r["baseUrl"])