from celery import Celery app = Celery('tasks', broker='amqp://172.17.0.4:5672') @app.task def add(x, y): return x + y