Skip to content

Commit e6ed9f3

Browse files
authored
Merge pull request #59 from astropy/learn_site_fix4
Debugging: test learn-astropy build
2 parents 7fcb3f0 + bdda033 commit e6ed9f3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

astropylibrarian/workflows/expirerecords.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ async def expire_old_records(
3737
)
3838
old_object_ids: List[str] = []
3939
for r in await algolia_index.browse_objects(obj):
40+
print(r)
4041
# Double check that we're deleting the right things.
41-
# if r["root_url"] != root_url:
42-
# logger.warning("root_url does not match: %s", r["root_url"])
43-
# continue
44-
# if r["index_epoch"] == index_epoch:
45-
# logger.warning("index_epoch matches current epoch: %s", r["index_epoch"])
46-
# continue
47-
old_object_ids.append(r["objectID"])
42+
if r.root_url != root_url:
43+
logger.warning("root_url does not match: %s", r.root_url)
44+
continue
45+
if r.index_epoch == index_epoch:
46+
logger.warning("index_epoch matches current epoch: %s", r.index_epoch)
47+
continue
48+
old_object_ids.append(r.objectID)
4849

4950
logger.info(
5051
"Collected %d old objectIDs for deletion, for %s",

0 commit comments

Comments
 (0)