diff --git a/swh/indexer/fossology_license.py b/swh/indexer/fossology_license.py --- a/swh/indexer/fossology_license.py +++ b/swh/indexer/fossology_license.py @@ -186,7 +186,3 @@ return self.idx_storage.content_fossology_license_get_partition( self.tool["id"], partition_id, nb_partitions, page_token=page_token ) - - -# alias for retrocompatibility -FossologyLicenseRangeIndexer = FossologyLicensePartitionIndexer diff --git a/swh/indexer/indexer.py b/swh/indexer/indexer.py --- a/swh/indexer/indexer.py +++ b/swh/indexer/indexer.py @@ -344,7 +344,7 @@ class ContentPartitionIndexer(BaseIndexer): - """A content range indexer. + """A content partition indexer. This expects as input a partition_id and a nb_partitions. This will then index the contents within that partition. @@ -521,10 +521,6 @@ return summary -# alias for retrocompatibility -ContentRangeIndexer = ContentPartitionIndexer - - class OriginIndexer(BaseIndexer): """An object type indexer, inherits from the :class:`BaseIndexer` and implements Origin indexing using the run method diff --git a/swh/indexer/mimetype.py b/swh/indexer/mimetype.py --- a/swh/indexer/mimetype.py +++ b/swh/indexer/mimetype.py @@ -159,7 +159,3 @@ return self.idx_storage.content_mimetype_get_partition( self.tool["id"], partition_id, nb_partitions, page_token=page_token ) - - -# alias for retrocompatibility -MimetypeRangeIndexer = MimetypePartitionIndexer diff --git a/swh/indexer/tasks.py b/swh/indexer/tasks.py --- a/swh/indexer/tasks.py +++ b/swh/indexer/tasks.py @@ -38,11 +38,11 @@ return MimetypeIndexer().run(*args, **kwargs) -@shared_task(name=__name__ + ".ContentRangeMimetype") -def range_mimetype(*args, **kwargs): +@shared_task(name=__name__ + ".ContentMimetypePartition") +def mimetype_partition(*args, **kwargs): return MimetypePartitionIndexer().run(*args, **kwargs) -@shared_task(name=__name__ + ".ContentRangeFossologyLicense") -def range_license(*args, **kwargs): +@shared_task(name=__name__ + ".ContentFossologyLicensePartition") +def license_partition(*args, **kwargs): return FossologyLicensePartitionIndexer().run(*args, **kwargs) diff --git a/swh/indexer/tests/test_tasks.py b/swh/indexer/tests/test_tasks.py --- a/swh/indexer/tests/test_tasks.py +++ b/swh/indexer/tests/test_tasks.py @@ -87,7 +87,7 @@ assert res.result == {"status": "eventful"} -def test_task_range_mimetype( +def test_task_mimetype_partition( mocker, swh_scheduler_celery_app, swh_scheduler_celery_worker, swh_config ): @@ -95,7 +95,7 @@ mock_indexer.return_value = {"status": "eventful"} res = swh_scheduler_celery_app.send_task( - "swh.indexer.tasks.ContentRangeMimetype", args=[0, 4], + "swh.indexer.tasks.ContentMimetypePartition", args=[0, 4], ) assert res res.wait() @@ -104,7 +104,7 @@ assert res.result == {"status": "eventful"} -def test_task_range_license( +def test_task_license_partition( mocker, swh_scheduler_celery_app, swh_scheduler_celery_worker, swh_config ): @@ -114,7 +114,7 @@ mock_indexer.return_value = {"status": "eventful"} res = swh_scheduler_celery_app.send_task( - "swh.indexer.tasks.ContentRangeFossologyLicense", args=[0, 4], + "swh.indexer.tasks.ContentFossologyLicensePartition", args=[0, 4], ) assert res res.wait()