Adds an emergency switch so we can run inbox distribution at save time (bypassing 'distrib' queue)

Set $config['queue']['inboxes'] = false to do so
This commit is contained in:
Brion Vibber 2010-01-27 18:39:17 -08:00
parent c67cdd7fcf
commit 3abfb454a3
2 changed files with 8 additions and 3 deletions

View File

@ -326,9 +326,13 @@ class Notice extends Memcached_DataObject
# XXX: someone clever could prepend instead of clearing the cache
$notice->blowOnInsert();
if (common_config('queue', 'inboxes')) {
$qm = QueueManager::get();
$qm->enqueue($notice, 'distrib');
} else {
$handler = new DistribQueueHandler();
$handler->handle($notice);
}
return $notice;
}

View File

@ -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'