Skip to content
Snippets Groups Projects
Commit ca731a78 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'remove-deprecated' into 'master'

Remove deprecated ListWorkers

See merge request !1454
parents bfc06e5e c6795dea
No related branches found
No related tags found
1 merge request!1454Remove deprecated ListWorkers
......@@ -76,7 +76,6 @@ from arkindex.project.mixins import (
ConflictAPIException,
CorpusACLMixin,
CustomPaginationViewMixin,
DeprecatedMixin,
ProcessACLMixin,
RepositoryACLMixin,
SelectionMixin,
......@@ -736,27 +735,6 @@ class RevisionRetrieve(RepositoryACLMixin, RetrieveAPIView):
return Revision.objects.filter(repo__in=self.executable_repositories)
@extend_schema(tags=['repos'])
@extend_schema_view(
get=extend_schema(operation_id='ListWorkersDeprecated'),
post=extend_schema(operation_id='CreateWorkerDeprecated'),
)
class DeprecatedWorkerList(DeprecatedMixin, ListCreateAPIView):
"""
List workers for a given repository UUID
Create a Worker instance on a repository for given slug, name and type, return existing
query if a worker with the same slug already exists on the repository
"""
permission_classes = (IsVerified, )
pagination_class = None
deprecation_message = (
'Listing workers associated to a repository is now deprecated. '
'A user is able to list all the workers for which they have an execution access '
'using `WorkerList` endpoint'
)
@extend_schema(tags=['repos'])
@extend_schema_view(
get=extend_schema(
......
......@@ -13,7 +13,6 @@ from arkindex.dataimport.api import (
DataImportFromFiles,
DataImportRetry,
DataImportsList,
DeprecatedWorkerList,
GitRepositoryImportHook,
ImportTranskribus,
ListProcessElements,
......@@ -202,7 +201,6 @@ api = [
path('imports/revisions/<uuid:pk>/', RevisionRetrieve.as_view(), name='revision-retrieve'),
# Workers
path('imports/repos/<uuid:pk>/workers/', DeprecatedWorkerList.as_view(), name='repository-workers'),
path('workers/', WorkerList.as_view(), name='workers-list'),
path('workers/<uuid:pk>/', WorkerRetrieve.as_view(), name='worker-retrieve'),
path('workers/<uuid:pk>/versions/', WorkerVersionList.as_view(), name='worker-versions'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment