Skip to content

Commit

Permalink
celery@indexing is part of healthcheck now
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Feb 23, 2021
1 parent a607cec commit 1ade6ca
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/common/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def ready(self):
plugin_dir.register(healthcheck.ESHealthCheck)
plugin_dir.register(healthcheck.FlowerHealthCheck)
plugin_dir.register(healthcheck.CeleryDefaultQueueHealthCheck)
plugin_dir.register(healthcheck.CeleryIndexingQueueHealthCheck)
plugin_dir.register(healthcheck.CeleryConcurrentThreadsHealthCheck)
plugin_dir.register(healthcheck.CeleryBulkImport0QueueHealthCheck)
plugin_dir.register(healthcheck.CeleryBulkImport1QueueHealthCheck)
Expand Down
4 changes: 4 additions & 0 deletions core/common/healthcheck/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ class CeleryConcurrentThreadsHealthCheck(CeleryQueueHealthCheck):
queues = {'concurrent'}


class CeleryIndexingQueueHealthCheck(CeleryQueueHealthCheck):
queues = {'indexing'}


class CeleryBulkImport0QueueHealthCheck(CeleryQueueHealthCheck):
queues = {'bulk_import_0'}

Expand Down
4 changes: 4 additions & 0 deletions core/common/healthcheck/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
'celery@default/', views.CeleryDefaultHealthCheckView.as_view(),
name='celery-default-healthcheck'
),
path(
'celery@indexing/', views.CeleryIndexingHealthCheckView.as_view(),
name='celery-indexing-healthcheck'
),
path(
'celery@concurrent/', views.CeleryConcurrentThreadsHealthCheckView.as_view(),
name='celery-concurrent-healthcheck'
Expand Down
7 changes: 6 additions & 1 deletion core/common/healthcheck/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from core.common.healthcheck.healthcheck import FlowerHealthCheck, CeleryDefaultQueueHealthCheck, \
CeleryBulkImport0QueueHealthCheck, CeleryBulkImportRootQueueHealthCheck, CeleryBulkImport3QueueHealthCheck, \
CeleryBulkImport2QueueHealthCheck, CeleryBulkImport1QueueHealthCheck, CeleryConcurrentThreadsHealthCheck, \
ESHealthCheck
ESHealthCheck, CeleryIndexingQueueHealthCheck


class BaseHealthcheckView(MainView):
Expand Down Expand Up @@ -38,6 +38,7 @@ class DBHealthcheckView(BaseHealthcheckView):
class CeleryHealthCheckView(BaseHealthcheckView):
_plugins = [
CeleryDefaultQueueHealthCheck(critical_service=True),
CeleryIndexingQueueHealthCheck(critical_service=True),
CeleryConcurrentThreadsHealthCheck(),
CeleryBulkImport0QueueHealthCheck(),
CeleryBulkImport1QueueHealthCheck(),
Expand All @@ -51,6 +52,10 @@ class CeleryDefaultHealthCheckView(BaseHealthcheckView):
_plugins = [CeleryDefaultQueueHealthCheck(critical_service=True)]


class CeleryIndexingHealthCheckView(BaseHealthcheckView):
_plugins = [CeleryIndexingQueueHealthCheck(critical_service=True)]


class CeleryBulkImport0HealthCheckView(BaseHealthcheckView):
_plugins = [CeleryBulkImport0QueueHealthCheck(critical_service=True)]

Expand Down

0 comments on commit 1ade6ca

Please sign in to comment.