File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
astropylibrarian/workflows Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change
1
+ # Mac OS
2
+ .DS_Store
3
+
1
4
# Byte-compiled / optimized / DLL files
2
5
__pycache__ /
3
6
* .py [cod ]
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ async def expire_old_records(
27
27
filters = (
28
28
f"root_url:{ escape_facet_value (root_url )} "
29
29
" AND NOT "
30
- f"root_url :{ escape_facet_value (root_url )} "
30
+ f"index_epoch :{ escape_facet_value (index_epoch )} "
31
31
)
32
32
33
33
obj = BrowseParamsObject (
@@ -36,12 +36,12 @@ async def expire_old_records(
36
36
attributes_to_highlight = [],
37
37
)
38
38
old_object_ids : List [str ] = []
39
- for r in await algolia_index .browse_objects (obj ):
39
+ async for r in algolia_index .browse_objects (obj ):
40
40
# Double check that we're deleting the right things.
41
41
if r ["root_url" ] != root_url :
42
- logger .warning ("root_url does not match: %s" , r ["baseUrl " ])
42
+ logger .warning ("root_url does not match: %s" , r ["root_url " ])
43
43
continue
44
- if r ["surrogateKey " ] == index_epoch :
44
+ if r ["index_epoch " ] == index_epoch :
45
45
logger .warning ("index_epoch matches current epoch: %s" , r ["index_epoch" ])
46
46
continue
47
47
old_object_ids .append (r ["objectID" ])
@@ -56,4 +56,4 @@ async def expire_old_records(
56
56
57
57
logger .info ("Finished deleting expired objects for %s" , root_url )
58
58
59
- return old_object_ids
59
+ return old_object_ids
You can’t perform that action at this time.
0 commit comments