diff options
Diffstat (limited to 'lib/queuemanager.php')
-rw-r--r-- | lib/queuemanager.php | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/lib/queuemanager.php b/lib/queuemanager.php index 274e1c2f6..a0b13fe55 100644 --- a/lib/queuemanager.php +++ b/lib/queuemanager.php @@ -156,20 +156,13 @@ abstract class QueueManager extends IoManager /** * Encode an object for queued storage. - * Next gen may use serialization. * * @param mixed $object * @return string */ protected function encode($object) { - if ($object instanceof Notice) { - return $object->id; - } else if (is_string($object)) { - return $object; - } else { - throw new ServerException("Can't queue this type", 500); - } + return serialize($object); } /** @@ -181,11 +174,7 @@ abstract class QueueManager extends IoManager */ protected function decode($frame) { - if (is_numeric($frame)) { - return Notice::staticGet(intval($frame)); - } else { - return $frame; - } + return unserialize($frame); } /** @@ -241,17 +230,8 @@ abstract class QueueManager extends IoManager $this->connect('sms', 'SmsQueueHandler'); } - // XMPP output handlers... - $this->connect('jabber', 'JabberQueueHandler'); - $this->connect('public', 'PublicQueueHandler'); - // @fixme this should get an actual queue - //$this->connect('confirm', 'XmppConfirmHandler'); - // For compat with old plugins not registering their own handlers. $this->connect('plugin', 'PluginQueueHandler'); - - $this->connect('xmppout', 'XmppOutQueueHandler', 'xmppdaemon'); - } Event::handle('EndInitializeQueueManager', array($this)); } @@ -278,8 +258,8 @@ abstract class QueueManager extends IoManager $group = 'queuedaemon'; if ($this->master) { // hack hack - if ($this->master instanceof XmppMaster) { - return 'xmppdaemon'; + if ($this->master instanceof ImMaster) { + return 'imdaemon'; } } return $group; |