diff gpp/forums/signals.py @ 470:d9b6c4ec1977

For #227; rework last commit slightly (r508). Adapt the desired forums signal signature to the queued_search API instead of the other way around.
author Brian Neal <bgneal@gmail.com>
date Wed, 17 Aug 2011 01:29:27 +0000
parents 3b30286adba5
children 82b97697312e
line wrap: on
line diff
--- a/gpp/forums/signals.py	Wed Aug 17 01:02:08 2011 +0000
+++ b/gpp/forums/signals.py	Wed Aug 17 01:29:27 2011 +0000
@@ -74,18 +74,16 @@
 # This signal is sent when a topic has had its textual content (title) changed.
 # The provided arguments are: 
 #   sender - the topic model instance 
-#   instance - the topic model instance
 #   created - True if the topic is new, False if updated
 
-topic_content_update = django.dispatch.Signal(providing_args=['action'])
+topic_content_update = django.dispatch.Signal(providing_args=['created'])
 
 # This signal is sent when a post has had its textual content (body) changed.
 # The provided arguments are: 
 #   sender - the post model instance 
-#   instance - the topic model instance
 #   created - True if the post is new, False if updated
 
-post_content_update = django.dispatch.Signal(providing_args=['action'])
+post_content_update = django.dispatch.Signal(providing_args=['created'])
 
 
 def notify_new_topic(topic):
@@ -93,7 +91,7 @@
     Sends the topic_content_update signal for a new topic instance.
 
     """
-    topic_content_update.send_robust(topic, instance=topic, created=True)
+    topic_content_update.send_robust(topic, created=True)
 
 
 def notify_updated_topic(topic):
@@ -101,7 +99,7 @@
     Sends the topic_content_update signal for an updated topic instance.
 
     """
-    topic_content_update.send_robust(topic, instance=topic, created=False)
+    topic_content_update.send_robust(topic, created=False)
 
 
 def notify_new_post(post):
@@ -109,7 +107,7 @@
     Sends the post_content_update signal for a new post instance.
 
     """
-    post_content_update.send_robust(post, instance=post, created=True)
+    post_content_update.send_robust(post, created=True)
 
 
 def notify_updated_post(post):
@@ -117,4 +115,4 @@
     Sends the post_content_update signal for an updated post instance.
 
     """
-    post_content_update.send_robust(post, instance=post, created=False)
+    post_content_update.send_robust(post, created=False)