Mercurial > public > sg101
annotate forums/tasks.py @ 866:98adae6e13a1
More WIP on ssl_images command.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 04 Dec 2014 20:32:43 -0600 |
parents | aeafbf3ecebf |
children |
rev | line source |
---|---|
bgneal@522 | 1 """ |
bgneal@522 | 2 Celery tasks for the forums application. |
bgneal@522 | 3 |
bgneal@522 | 4 """ |
bgneal@750 | 5 from __future__ import absolute_import |
bgneal@750 | 6 |
bgneal@750 | 7 from celery import shared_task |
bgneal@522 | 8 |
bgneal@522 | 9 import forums.latest |
bgneal@522 | 10 |
bgneal@522 | 11 |
bgneal@750 | 12 @shared_task |
bgneal@522 | 13 def new_post_task(post_id): |
bgneal@522 | 14 """ |
bgneal@522 | 15 This task performs new post processing on a Celery task. |
bgneal@522 | 16 |
bgneal@522 | 17 """ |
bgneal@522 | 18 forums.latest.process_new_post(post_id) |
bgneal@522 | 19 |
bgneal@522 | 20 |
bgneal@750 | 21 @shared_task |
bgneal@595 | 22 def updated_post_task(post_id): |
bgneal@595 | 23 """ |
bgneal@595 | 24 This task performs updated post processing on a Celery task. |
bgneal@595 | 25 |
bgneal@595 | 26 """ |
bgneal@595 | 27 forums.latest.process_updated_post(post_id) |
bgneal@595 | 28 |
bgneal@595 | 29 |
bgneal@750 | 30 @shared_task |
bgneal@522 | 31 def new_topic_task(topic_id): |
bgneal@522 | 32 """ |
bgneal@522 | 33 This task performs new topic processing on a Celery task. |
bgneal@522 | 34 |
bgneal@522 | 35 """ |
bgneal@522 | 36 forums.latest.process_new_topic(topic_id) |
bgneal@595 | 37 |
bgneal@595 | 38 |
bgneal@750 | 39 @shared_task |
bgneal@595 | 40 def updated_topic_task(topic_id): |
bgneal@595 | 41 """ |
bgneal@595 | 42 This task performs updated topic processing on a Celery task. |
bgneal@595 | 43 |
bgneal@595 | 44 """ |
bgneal@595 | 45 forums.latest.process_updated_topic(topic_id) |