@@ -134,12 +134,12 @@ def task__update_share(self, guid: str, is_backfill=False, osfmap_partition_name
134134@celery_app .task
135135def task__reindex_failed_or_not_indexed_resource_into_share (resource_type : str , start_id : int = 0 , chunk_count : int = 200 , chunk_size : int = 500 ):
136136 from osf .management .commands .recatalog_metadata import recatalog
137- queryset = get_not_indexed_guids_for_resource_with_no_indexed_guid (resource_type , first_guid = False )
137+ queryset = get_not_indexed_guids_for_resource_with_no_indexed_guid (resource_type , only_oldest_guid = False )
138138 # chunk count and chunk size up to discussion what will be better with Cloud Team
139139 recatalog (queryset , start_id , chunk_count , chunk_size )
140140
141141
142- def get_not_indexed_guids_for_resource_with_no_indexed_guid (resource_type : str , first_guid : bool = True ):
142+ def get_not_indexed_guids_for_resource_with_no_indexed_guid (resource_type : str , only_oldest_guid : bool = True ):
143143 from osf .models import Guid , Registration , Preprint , Node , OSFUser
144144 from addons .osfstorage .models import OsfStorageFile
145145 common_not_indexed_public_resource_extract_query = (
@@ -154,7 +154,7 @@ def get_not_indexed_guids_for_resource_with_no_indexed_guid(resource_type: str,
154154 'files' : (OsfStorageFile , Q (deleted__isnull = True ), ('first_guid' , 'name' , 'date_last_indexed' )),
155155 }
156156 resource_model , query , values_to_return = resource_mapper .get (resource_type , 'projects' )
157- if first_guid :
157+ if only_oldest_guid :
158158 model_content_type = ContentType .objects .get_for_model (resource_model )
159159 first_guid_sq = Guid .objects .filter (
160160 content_type = model_content_type ,
0 commit comments