Skip to content

Commit

Permalink
Add Celery health check endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
sudan45 committed Nov 22, 2024
1 parent 8c1c56b commit c4605f7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
8 changes: 8 additions & 0 deletions deep/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@
'drf_yasg', # API Documentation
'graphene_django',
'graphene_graphiql_explorer',
# heath check
'health_check',
'health_check.db', # stock Django health checkers
'health_check.cache',
'health_check.storage',
'health_check.contrib.migrations',
'health_check.contrib.celery', # requires celery
'health_check.contrib.celery_ping', # requires celery
] + [
'{}.{}.apps.{}Config'.format(
APPS_DIR.split('/')[-1],
Expand Down
1 change: 1 addition & 0 deletions deep/tests/test_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from django.utils import timezone
from django.conf import settings


from deep.middleware import _set_current_request as _set_middleware_current_request
from user.models import User
from project.models import ProjectRole, Project
Expand Down
4 changes: 3 additions & 1 deletion deep/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
ProjectPublicVizView,
PasswordChanged,
get_frontend_url,
graphql_docs
graphql_docs,
)
from organization.views import (
OrganizationViewSet,
Expand Down Expand Up @@ -619,6 +619,8 @@ def get_api_path(path):
name="favicon"),

re_path('ses-bounce/?$', ses_bounce_handler_view, name='ses_bounce'),
re_path(r'health-check/', include('health_check.urls')),

] + [
# graphql patterns
re_path('^graphql/?$', csrf_exempt(CustomGraphQLView.as_view())),
Expand Down
23 changes: 21 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ django-environ = "^0.8.1"
uwsgi = "*"
django-admin-autocomplete-filter = "^0.7.1"
aws-sns-message-validator = "0.0.5 "
django-health-check = "^3.18.3"

# Thumbnail
# Shapely = "==1.7.1"
Expand Down

0 comments on commit c4605f7

Please sign in to comment.