tasks.py 157 B

1234567891011
  1. from celery import Celery
  2. app = Celery('tasks', broker='amqp://')
  3. @app.task()
  4. def add(x, y):
  5. return x + y
  6. if __name__ == '__main__':
  7. app.start()