summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-01-27 18:39:17 -0800
committerBrion Vibber <brion@pobox.com>2010-01-27 18:39:17 -0800
commit3abfb454a381806a0f237e1463d2ba9a8612c22a (patch)
tree34696ada2ba1a3b81cc72e1e2d5c065b4f42444e /classes
parentc67cdd7fcfc90763c23c1e1a3a94118dc4260084 (diff)
Adds an emergency switch so we can run inbox distribution at save time (bypassing 'distrib' queue)
Set $config['queue']['inboxes'] = false to do so
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 0966697e2..6b364fb5c 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -326,9 +326,13 @@ class Notice extends Memcached_DataObject
# XXX: someone clever could prepend instead of clearing the cache
$notice->blowOnInsert();
- $qm = QueueManager::get();
-
- $qm->enqueue($notice, 'distrib');
+ if (common_config('queue', 'inboxes')) {
+ $qm = QueueManager::get();
+ $qm->enqueue($notice, 'distrib');
+ } else {
+ $handler = new DistribQueueHandler();
+ $handler->handle($notice);
+ }
return $notice;
}