summaryrefslogtreecommitdiff
path: root/lib/queuemanager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/queuemanager.php')
-rw-r--r--lib/queuemanager.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/queuemanager.php b/lib/queuemanager.php
index e5cf8239e..0063ed5f3 100644
--- a/lib/queuemanager.php
+++ b/lib/queuemanager.php
@@ -181,7 +181,9 @@ abstract class QueueManager extends IoManager
{
if (isset($this->handlers[$queue])) {
$class = $this->handlers[$queue];
- if (class_exists($class)) {
+ if(is_object($class)) {
+ return $class;
+ } else if (class_exists($class)) {
return new $class();
} else {
common_log(LOG_ERR, "Nonexistent handler class '$class' for queue '$queue'");
@@ -243,7 +245,7 @@ abstract class QueueManager extends IoManager
* Only registered transports will be reliably picked up!
*
* @param string $transport
- * @param string $class
+ * @param string $class class name or object instance
* @param string $group
*/
public function connect($transport, $class, $group='queuedaemon')