feat: celery task api

This commit is contained in:
Aaron3S
2022-10-27 19:23:15 +08:00
parent 4ab14b4a59
commit da911651aa
7 changed files with 63 additions and 15 deletions

View File

@@ -99,7 +99,7 @@ class CeleryPeriodTaskViewSet(CommonApiMixin, viewsets.ModelViewSet):
class CeleryTaskViewSet(CommonApiMixin, viewsets.ReadOnlyModelViewSet):
queryset = CeleryTask.objects.all()
queryset = CeleryTask.objects.filter(name__in=['ops.tasks.hello', 'ops.tasks.hello_error', 'ops.tasks.hello_random'])
serializer_class = CeleryTaskSerializer
http_method_names = ('get', 'head', 'options',)