We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 887d35cf authored by Evan Prodromou's avatar Evan Prodromou

better queue manager detection, new method fail()

parent e0bf8ad9
...@@ -39,22 +39,22 @@ class QueueManager ...@@ -39,22 +39,22 @@ class QueueManager
if (Event::handle('StartNewQueueManager', array(&self::$qm))) { if (Event::handle('StartNewQueueManager', array(&self::$qm))) {
$enabled = common_config('queue', 'enabled'); $enabled = common_config('queue', 'enabled');
$type = common_config('queue', 'sub'); $type = common_config('queue', 'subsystem');
if (!$enabled) { if (!$enabled) {
// does everything immediately // does everything immediately
return new UnQueueManager(); self::$qm = new UnQueueManager();
} } else {
switch ($type) {
switch ($type) { case 'db':
case 'db': self::$qm = new DBQueueManager();
self::$qm = new DBQueueManager(); break;
break; case 'stomp':
case 'stomp': self::$qm = new StompQueueManager();
self::$qm = new StompQueueManager(); break;
break; default:
default: throw new ServerException("No queue manager class for type '$type'");
throw new ServerException("No queue manager class for type '$type'"); }
} }
} }
...@@ -81,4 +81,9 @@ class QueueManager ...@@ -81,4 +81,9 @@ class QueueManager
{ {
throw ServerException("Unimplemented function 'done' called"); throw ServerException("Unimplemented function 'done' called");
} }
function fail($object, $queue)
{
throw ServerException("Unimplemented function 'fail' called");
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment