File: tasks.py

package info (click to toggle)
celery 5.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 8,324 kB
  • sloc: python: 67,132; sh: 795; makefile: 378
file content (12 lines) | stat: -rw-r--r-- 158 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
from celery import Celery

app = Celery('tasks', broker='amqp://')


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


if __name__ == '__main__':
    app.start()