comparison gpp/forums/tasks.py @ 522:82b97697312e

Created Celery tasks to process new posts and topics. Keep the updated topic set in Redis. This is for tickets #194, #237, #239.
author Brian Neal <bgneal@gmail.com>
date Sun, 18 Dec 2011 23:46:52 +0000
parents
children
comparison
equal deleted inserted replaced
521:dd14ab08a9c4 522:82b97697312e
1 """
2 Celery tasks for the forums application.
3
4 """
5 from celery.task import task
6
7 import forums.latest
8
9
10 @task
11 def new_post_task(post_id):
12 """
13 This task performs new post processing on a Celery task.
14
15 """
16 forums.latest.process_new_post(post_id)
17
18
19 @task
20 def new_topic_task(topic_id):
21 """
22 This task performs new topic processing on a Celery task.
23
24 """
25 forums.latest.process_new_topic(topic_id)