summaryrefslogtreecommitdiff
path: root/lib/queuemanager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/queuemanager.php')
-rw-r--r--lib/queuemanager.php44
1 files changed, 5 insertions, 39 deletions
diff --git a/lib/queuemanager.php b/lib/queuemanager.php
index 64bb52e10..162c9f375 100644
--- a/lib/queuemanager.php
+++ b/lib/queuemanager.php
@@ -155,21 +155,14 @@ abstract class QueueManager extends IoManager
}
/**
- * Encode an object or variable for queued storage.
- * Notice objects are currently stored as an id reference;
- * other items are serialized.
+ * Encode an object for queued storage.
*
* @param mixed $item
* @return string
*/
protected function encode($item)
{
- if ($item instanceof Notice) {
- // Backwards compat
- return $item->id;
- } else {
- return serialize($item);
- }
+ return serialize($object);
}
/**
@@ -181,25 +174,7 @@ abstract class QueueManager extends IoManager
*/
protected function decode($frame)
{
- if (is_numeric($frame)) {
- // Back-compat for notices...
- return Notice::staticGet(intval($frame));
- } elseif (substr($frame, 0, 1) == '<') {
- // Back-compat for XML source
- return $frame;
- } else {
- // Deserialize!
- #$old = error_reporting();
- #error_reporting($old & ~E_NOTICE);
- $out = unserialize($frame);
- #error_reporting($old);
-
- if ($out === false && $frame !== 'b:0;') {
- common_log(LOG_ERR, "Couldn't unserialize queued frame: $frame");
- return false;
- }
- return $out;
- }
+ return unserialize($frame);
}
/**
@@ -255,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));
}
@@ -292,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;