Add UnQueueManager for immediate handling
Perhaps it's a little precious, but I took out the switches in util.php to determine what's supposed to be sent when, and made a queuemanager class that will just do things when they're supposed to be done.
This commit is contained in:
@@ -36,9 +36,15 @@ class QueueManager
|
||||
{
|
||||
if (empty(self::$qm)) {
|
||||
|
||||
$type = common_config('queue', 'sub');
|
||||
if (Event::handle('StartNewQueueManager', array(&self::$qm))) {
|
||||
|
||||
if (Event::handle('StartNewQueueManager', array($type, &self::$qm))) {
|
||||
$enabled = common_config('queue', 'enabled');
|
||||
$type = common_config('queue', 'sub');
|
||||
|
||||
if (!$enabled) {
|
||||
// does everything immediately
|
||||
return new UnQueueManager();
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'db':
|
||||
|
Reference in New Issue
Block a user