diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-01 12:09:18 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-01 12:09:18 -0400 |
commit | 887d35cfc8c1d42e5af67d0161b244545cda464a (patch) | |
tree | 02f378433fe270c02ca33763a4e7a40ad8ecdf3a | |
parent | e0bf8ad95b2d2ddc7b988c25e9cffa20075a5d8c (diff) |
better queue manager detection, new method fail()
-rw-r--r-- | lib/queuemanager.php | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/lib/queuemanager.php b/lib/queuemanager.php index 6bb21de9b..1bf4d4dec 100644 --- a/lib/queuemanager.php +++ b/lib/queuemanager.php @@ -39,22 +39,22 @@ 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(); - } - - switch ($type) { - case 'db': - self::$qm = new DBQueueManager(); - break; - case 'stomp': - self::$qm = new StompQueueManager(); - break; - default: - throw new ServerException("No queue manager class for type '$type'"); + self::$qm = new UnQueueManager(); + } else { + switch ($type) { + case 'db': + self::$qm = new DBQueueManager(); + break; + case 'stomp': + self::$qm = new StompQueueManager(); + break; + default: + throw new ServerException("No queue manager class for type '$type'"); + } } } @@ -81,4 +81,9 @@ class QueueManager { throw ServerException("Unimplemented function 'done' called"); } + + function fail($object, $queue) + { + throw ServerException("Unimplemented function 'fail' called"); + } } |