Skip to content
Snippets Groups Projects

Do not run development server for backend dev server on Kubernetes

Merged Kenzo-Hugo Hillion requested to merge 76-new-prod-backend-and-logs into dev
7 files
+ 69
4
Compare changes
  • Side-by-side
  • Inline
Files
7
import logging
from rest_framework import permissions
from rest_framework.response import Response
from rest_framework.status import HTTP_500_INTERNAL_SERVER_ERROR
@@ -8,6 +10,8 @@ from metagenedb.apps.catalog.management.commands.compute_stats import (
ComputeCounts, ComputeGeneLength, ComputeTaxonomyRepartition
)
logger = logging.getLogger(__name__)
class AdminCommandsAPI(APIView):
authentication_classes = [JSONWebTokenAuthentication]
@@ -24,7 +28,8 @@ class ComputeStatisticsAPI(AdminCommandsAPI):
self.compute_class().all()
# ComputeGeneLength().all()
# ComputeTaxonomyRepartition().all()
except Exception:
except Exception as exception:
logger.warning(exception)
return Response({"message": self.error_message},
status=HTTP_500_INTERNAL_SERVER_ERROR)
return Response({"message": self.success_message})
Loading