Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit ed10b42

Browse files
committed
removed auth and permsission classes for celery metrics endpoint
1 parent f158e69 commit ed10b42

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

backend/apps/core/views.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
from django.http import JsonResponse
55
from django.views.generic import TemplateView
66
from rest_framework import viewsets
7-
from rest_framework.decorators import api_view
7+
from rest_framework.decorators import (
8+
api_view,
9+
permission_classes,
10+
authentication_classes,
11+
)
12+
813

914
from .utils.celery_utils import publish_celery_metrics
1015
from apps.core.tasks import debug_task, send_test_email_task, sleep_task
@@ -50,6 +55,8 @@ def sleep_task_view(request):
5055

5156

5257
@api_view(["POST"])
58+
@permission_classes([])
59+
@authentication_classes([])
5360
def celery_metrics(request):
5461
if request.data.get("celery_metrics_token") == os.environ.get(
5562
"CELERY_METRICS_TOKEN"

0 commit comments

Comments
 (0)