summaryrefslogtreecommitdiff
path: root/lib/distribqueuehandler.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-07-12 14:21:57 -0700
committerBrion Vibber <brion@pobox.com>2010-07-12 14:21:57 -0700
commitcd29d3d646379aa9a1352035973c8e379cc7f42b (patch)
treee064c5292c546e6df8eaad9609a56150f69c62c3 /lib/distribqueuehandler.php
parentbd8506eee883ecd424fdf3d7e545c10c754df6ff (diff)
parent1b3b7f9a422f6b703ec36d43e2283f91a9835f3b (diff)
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/distribqueuehandler.php')
-rw-r--r--lib/distribqueuehandler.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/distribqueuehandler.php b/lib/distribqueuehandler.php
index d2be7a92c..8f4b72d5c 100644
--- a/lib/distribqueuehandler.php
+++ b/lib/distribqueuehandler.php
@@ -49,19 +49,22 @@ class DistribQueueHandler
}
/**
- * Here's the meat of your queue handler -- you're handed a Notice
- * object, which you may do as you will with.
+ * Handle distribution of a notice after we've saved it:
+ * @li add to local recipient inboxes
+ * @li send email notifications to local @-reply targets
+ * @li run final EndNoticeSave plugin events
+ * @li put any remaining post-processing into the queues
*
* If this function indicates failure, a warning will be logged
* and the item is placed back in the queue to be re-run.
*
+ * @fixme addToInboxes is known to fail sometimes with large recipient sets
+ *
* @param Notice $notice
* @return boolean true on success, false on failure
*/
function handle($notice)
{
- // XXX: do we need to change this for remote users?
-
try {
$notice->addToInboxes();
} catch (Exception $e) {
@@ -69,6 +72,12 @@ class DistribQueueHandler
}
try {
+ $notice->sendReplyNotifications();
+ } catch (Exception $e) {
+ $this->logit($notice, $e);
+ }
+
+ try {
Event::handle('EndNoticeSave', array($notice));
// Enqueue for other handlers
} catch (Exception $e) {