revsys / django-health-check

a pluggable app that runs a full check on the deployment, using a number of plugins to check e.g. database, queue server, celery processes, etc.
https://readthedocs.org/projects/django-health-check/
MIT License
1.25k stars 194 forks source link

Allow CeleryPingHealthCheck to check user-specific queues #428

Open BoPeng opened 6 months ago

BoPeng commented 6 months ago

CeleryPingHealthCheck checks if some pre-defined queues have active workers

https://github.com/revsys/django-health-check/blob/251b1562c1a7b4bb95b46066fbde0bfaac41567b/health_check/contrib/celery_ping/backends.py#L53

Upon checking, we found that the CELERY_QUEUES setting is defined but is empty for our production server. Because this setting is now called task_queues and its documentation suggests against specifying this setting and use automatic routing, we do not want to mess with this option for our server. Can django-health-check allow a setting for a list of queues to check?

sevdog commented 6 months ago

This is related to #374.

BoPeng commented 6 months ago

Yes, but I was expecting a separate setting that allows us to bypass celery configuration since app.conf.CELERY_QUEUES is empty if auto-routing is used. I mean, the production server should be flexible enough to dispatch to available workers automatically but healthcheck should alert us when some workers and/or queues are unavailable.