The following is a simple application that uses Redis as a broker, where consumer.py sends messages to producer.py. Both the consumer and the producer require this configuration, where you can use the database with number 0 of your local Redis installation:
app = Celery (‘celery_tasks',broker='redis://localhost:6379/0',backend='redis://localhost:6379/0')
To establish a connection with Celery, we need to set broker and backend parameters. The broker parameter allows specification of the server address, where the tasks are stored and the backend parameter is the address where Celery puts the results so that we can use them in our application. In this case, both addresses are the same, executing in localhost ...