Skip to content

Commit 5050c48

Browse files
committed
Celery example
1 parent cbc7822 commit 5050c48

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎__init__.py‎

Whitespace-only changes.

‎tasks.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from celery import Celery
2+
3+
app = Celery("tasks", broker="pyamqp://guest@localhost//", backend="rpc://")
4+
5+
6+
@app.task
7+
def countdown(n=int(5e8)):
8+
assert isinstance(n, int)
9+
for _ in range(n):
10+
n -= 1
11+
return n

0 commit comments

Comments
 (0)