Celery Does Not Process Task in Kubernetes with Redis Celery Does Not Process Task in Kubernetes with Redis kubernetes kubernetes

Celery Does Not Process Task in Kubernetes with Redis


Running the celery tasks without apply_async allowed me to debug this issue, showing that there was a concurrency logic error in the Celery tasks. I highly recommend this method of debugging Celery tasks.

Instead of:

from my_code import my_taskcelery_params = {'key': 'value'}my_task.apply_async(queue='worker', kwargs=celery_params)

I used:

from my_code import my_taskcelery_params = {'key': 'value'}my_task(**celery_params)

This allowed me to locate the concurrency issue. After I had found the bug, I converted the code back to an asynchronous method call using apply_async.