summaryrefslogtreecommitdiff
path: root/tasks.py
blob: 182a9d3ef895d96340b3f14a694dbd403dc06b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
from celery import Celery

celery = Celery('tasks', broker='redis://localhost')


@celery.task
def fib(n):
    if n > 1:
        return fib(n - 1) + fib(n - 2)
    else:
        return 1