skip to Main Content

I have django 3.2.7, celery 5.2.1, redis 3.5.3

I have next celery settings. (REDIS_PASSWORD) is env variable:

CELERY_BROKER_URL = f'redis://:{REDIS_PASSWORD}@redis:6379/4'
CELERY_BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 3600}
CELERY_RESULT_BACKEND = f'redis://:{REDIS_PASSWORD}@redis:6379/1'
CELERY_ACCEPT_CONTENT = ['application/json']

But when I start my docker-compose app, it shows me

celery | --- ***** ----- 
celery | -- ******* ---- Linux-5.11.0-34-generic-x86_64-with-glibc2.31 2021-09-16 10:20:11
celery | - *** --- * --- 
celery | - ** ---------- [config]
celery | - ** ---------- .> app:         project:0x7f5cd0df0880
celery | - ** ---------- .> transport:   redis://redis:6379/0 <==== NO CHANGES HERE
celery | - ** ---------- .> results:     redis://:**@redis:6379/1
celery | - *** --- * --- .> concurrency: 16 (prefork)
celery | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
celery | --- ***** ----- 

How can I set it?

2

Answers


  1. Chosen as BEST ANSWER

    Problem was solved by removing environment params from docker-compose file.


  2. CELERY_BROKER_URL and CELERY_RESULT_BACKEND have been changed to ‘broker_url’ and ‘result_backend’respectively. When I changed to newer names for env variables, I was able to edit the transport url.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search