From 598072468c9fdb07df2cda9da207f123b14566ae Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 15 Jan 2010 11:13:06 -0800 Subject: --xmpp-only hack for queuedaemon.php to run separate queue daemon with only xmpp threads --- lib/queuemanager.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'lib/queuemanager.php') diff --git a/lib/queuemanager.php b/lib/queuemanager.php index b98e57a1f..291174d3c 100644 --- a/lib/queuemanager.php +++ b/lib/queuemanager.php @@ -149,11 +149,13 @@ abstract class QueueManager extends IoManager function initialize() { if (Event::handle('StartInitializeQueueManager', array($this))) { - $this->connect('plugin', 'PluginQueueHandler'); - $this->connect('omb', 'OmbQueueHandler'); - $this->connect('ping', 'PingQueueHandler'); - if (common_config('sms', 'enabled')) { - $this->connect('sms', 'SmsQueueHandler'); + if (!defined('XMPP_ONLY_FLAG')) { // hack! + $this->connect('plugin', 'PluginQueueHandler'); + $this->connect('omb', 'OmbQueueHandler'); + $this->connect('ping', 'PingQueueHandler'); + if (common_config('sms', 'enabled')) { + $this->connect('sms', 'SmsQueueHandler'); + } } // XMPP output handlers... @@ -165,10 +167,14 @@ abstract class QueueManager extends IoManager $this->connect('confirm', 'XmppConfirmHandler'); } - // For compat with old plugins not registering their own handlers. - $this->connect('plugin', 'PluginQueueHandler'); + if (!defined('XMPP_ONLY_FLAG')) { // hack! + // For compat with old plugins not registering their own handlers. + $this->connect('plugin', 'PluginQueueHandler'); + } + } + if (!defined('XMPP_ONLY_FLAG')) { // hack! + Event::handle('EndInitializeQueueManager', array($this)); } - Event::handle('EndInitializeQueueManager', array($this)); } /** -- cgit v1.2.3-54-g00ecf