src.check_celery_alive

Defines functions and decorators for checking if Celery worker is running.

Functions

check_celery_alive(→ Callable[Ellipsis, flask.Response])

Check if the Celery workers are running and return INTERNAL_SERVER_ERROR if they are down using function decorator.

Module Contents

src.check_celery_alive.check_celery_alive(f: Callable[Ellipsis, flask.Response]) Callable[Ellipsis, flask.Response]

Check if the Celery workers are running and return INTERNAL_SERVER_ERROR if they are down using function decorator.

Parameters:

f (Callable[..., Response]) – The view function that is being decorated.

Returns:

Response is SERVICE_UNAVAILABLE if the celery workers are down, otherwise continue to function f

Return type:

Callable[…, Response]