diff options
author | Brion Vibber <brion@pobox.com> | 2010-01-27 18:39:17 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-01-27 18:39:17 -0800 |
commit | 3abfb454a381806a0f237e1463d2ba9a8612c22a (patch) | |
tree | 34696ada2ba1a3b81cc72e1e2d5c065b4f42444e | |
parent | c67cdd7fcfc90763c23c1e1a3a94118dc4260084 (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
-rw-r--r-- | classes/Notice.php | 10 | ||||
-rw-r--r-- | lib/default.php | 1 |
2 files changed, 8 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; } diff --git a/lib/default.php b/lib/default.php index 10ea34864..c729193b5 100644 --- a/lib/default.php +++ b/lib/default.php @@ -87,6 +87,7 @@ $default = 'monitor' => null, // URL to monitor ping endpoint (work in progress) 'softlimit' => '90%', // total size or % of memory_limit at which to restart queue threads gracefully 'debug_memory' => false, // true to spit memory usage to log + 'inboxes' => true, // true to do inbox distribution & output queueing from in background via 'distrib' queue ), 'license' => array('type' => 'cc', # can be 'cc', 'allrightsreserved', 'private' |