Skip to content

Commit

Permalink
Merge pull request #64 from astropy/hits_v2
Browse files Browse the repository at this point in the history
expirerecords: try not `await`ing before accessing `hits`
  • Loading branch information
jeffjennings authored Feb 6, 2025
2 parents 6e6717a + 823b050 commit f2809fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astropylibrarian/workflows/expirerecords.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ async def expire_old_records(
)
old_object_ids: List[str] = []
# for r in await algolia_index.browse_objects(obj).hits:
records = await algolia_index.browse_objects(obj)
for r in records.hits:
records = await algolia_index.browse_objects(obj).hits
for r in records:
# Double check that we're deleting the right things.
if r.root_url != root_url:
logger.warning("root_url does not match: %s", r.root_url)
Expand Down

0 comments on commit f2809fb

Please sign in to comment.