Mercurial > public > sg101
diff gpp/forums/signals.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 | d9b6c4ec1977 |
children |
line wrap: on
line diff
--- a/gpp/forums/signals.py Sat Dec 17 23:43:00 2011 +0000 +++ b/gpp/forums/signals.py Sun Dec 18 23:46:52 2011 +0000 @@ -7,8 +7,6 @@ import django.dispatch from forums.models import Forum, Topic, Post -from forums.views.subscriptions import notify_topic_subscribers -from forums.tools import auto_favorite, auto_subscribe def on_topic_save(sender, **kwargs): @@ -22,6 +20,7 @@ topic = kwargs['instance'] topic.forum.topic_count_update() topic.forum.save() + forums.latest.notify_topic_delete(topic) def on_post_save(sender, **kwargs): @@ -36,13 +35,6 @@ post.topic.forum.post_count_update() post.topic.forum.save() - # send out any email notifications - notify_topic_subscribers(post) - - # perform any auto-favorite and auto-subscribe actions for the new post - auto_favorite(post) - auto_subscribe(post) - def on_post_delete(sender, **kwargs): post = kwargs['instance'] @@ -116,3 +108,7 @@ """ post_content_update.send_robust(post, created=False) + + +# Avoid circular imports +import forums.latest