tasks.py 208 B

1234567891011121314151617
  1. # Create your tasks here
  2. from celery import shared_task
  3. @shared_task
  4. def add(x, y):
  5. return x + y
  6. @shared_task
  7. def mul(x, y):
  8. return x * y
  9. @shared_task
  10. def xsum(numbers):
  11. return sum(numbers)