Skip to content

Commit 25ad4c9

Browse files
authored
Merge pull request #62 from astropy/await_async
expiring records: await/async order of operations
2 parents 95c2f92 + 8974dbf commit 25ad4c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

astropylibrarian/workflows/expirerecords.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ async def expire_old_records(
3636
attributes_to_highlight=[],
3737
)
3838
old_object_ids: List[str] = []
39-
for r in await algolia_index.browse_objects(obj).hits:
39+
# for r in await algolia_index.browse_objects(obj).hits:
40+
records = await algolia_index.browse_objects(obj)
41+
for r in records.hits:
4042
# Double check that we're deleting the right things.
4143
if r.root_url != root_url:
4244
logger.warning("root_url does not match: %s", r.root_url)

0 commit comments

Comments
 (0)