<filename>celery_prj/tasks.py
from celery import Celery

app = Celery('tasks',
             backend='redis://redis:6379/2',
             broker='redis://redis:6379/2')

@app.task
def add(x, y):
    return x + y

<filename>celery_prj/tasks.py
from celery import Celery

app = Celery('tasks',
             backend='redis://redis:6379/2',
             broker='redis://redis:6379/2')

@app.task
def add(x, y):
    return x + y
