Celery configuration for Redis backend
Not too obvious since doc here doesn’t mention it. Working configuration:
- CARROT_BACKEND = "ghettoq.taproot.Redis"
- CELERY_RESULT_BACKEND = "redis"
- REDIS_HOST = "localhost"
- REDIS_PORT = 6379
- REDIS_DB = 0
- REDIS_CONNECT_RETRY = True #this one is deprecated
- BROKER_HOST = "localhost" # Maps to redis host.
- BROKER_PORT = 6379 # Maps to redis port.
- BROKER_VHOST = "0" # Maps to database number.
- #this line will screw up things for ghettoq backend
- #CELERY_DEFAULT_EXCHANGE = "tasks"
- CELERY_IMPORTS = ("tasks", )
Follow this link for more details
Tags: python, redis, tasks