Mercurial > public > sg101
annotate forums/tasks.py @ 581:ee87ea74d46b
For Django 1.4, rearranged project structure for new manage.py.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 May 2012 17:10:48 -0500 |
parents | gpp/forums/tasks.py@82b97697312e |
children | f3fded5df64b |
rev | line source |
---|---|
bgneal@522 | 1 """ |
bgneal@522 | 2 Celery tasks for the forums application. |
bgneal@522 | 3 |
bgneal@522 | 4 """ |
bgneal@522 | 5 from celery.task import task |
bgneal@522 | 6 |
bgneal@522 | 7 import forums.latest |
bgneal@522 | 8 |
bgneal@522 | 9 |
bgneal@522 | 10 @task |
bgneal@522 | 11 def new_post_task(post_id): |
bgneal@522 | 12 """ |
bgneal@522 | 13 This task performs new post processing on a Celery task. |
bgneal@522 | 14 |
bgneal@522 | 15 """ |
bgneal@522 | 16 forums.latest.process_new_post(post_id) |
bgneal@522 | 17 |
bgneal@522 | 18 |
bgneal@522 | 19 @task |
bgneal@522 | 20 def new_topic_task(topic_id): |
bgneal@522 | 21 """ |
bgneal@522 | 22 This task performs new topic processing on a Celery task. |
bgneal@522 | 23 |
bgneal@522 | 24 """ |
bgneal@522 | 25 forums.latest.process_new_topic(topic_id) |