better queue manager detection, new method fail()
This commit is contained in:
parent
e0bf8ad95b
commit
887d35cfc8
|
@ -39,13 +39,12 @@ class QueueManager
|
|||
if (Event::handle('StartNewQueueManager', array(&self::$qm))) {
|
||||
|
||||
$enabled = common_config('queue', 'enabled');
|
||||
$type = common_config('queue', 'sub');
|
||||
$type = common_config('queue', 'subsystem');
|
||||
|
||||
if (!$enabled) {
|
||||
// does everything immediately
|
||||
return new UnQueueManager();
|
||||
}
|
||||
|
||||
self::$qm = new UnQueueManager();
|
||||
} else {
|
||||
switch ($type) {
|
||||
case 'db':
|
||||
self::$qm = new DBQueueManager();
|
||||
|
@ -57,6 +56,7 @@ class QueueManager
|
|||
throw new ServerException("No queue manager class for type '$type'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return self::$qm;
|
||||
}
|
||||
|
@ -81,4 +81,9 @@ class QueueManager
|
|||
{
|
||||
throw ServerException("Unimplemented function 'done' called");
|
||||
}
|
||||
|
||||
function fail($object, $queue)
|
||||
{
|
||||
throw ServerException("Unimplemented function 'fail' called");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user