Skip to content

Commit 8974dbf

Browse files
committed
await/async order of operations
1 parent 95c2f92 commit 8974dbf

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)