Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing

This commit is contained in:
Brion Vibber
2010-03-10 11:56:51 -08:00
4 changed files with 136 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ class QueueDaemon extends SpawningDaemon
{
$this->log(LOG_INFO, 'checking for queued notices');
$master = new QueueMaster($this->get_id());
$master = new QueueMaster($this->get_id(), $this->processManager());
$master->init($this->allsites);
try {
$master->service();
@@ -125,6 +125,14 @@ class QueueDaemon extends SpawningDaemon
class QueueMaster extends IoMaster
{
protected $processManager;
function __construct($id, $processManager)
{
parent::__construct($id);
$this->processManager = $processManager;
}
/**
* Initialize IoManagers which are appropriate to this instance.
*/
@@ -135,6 +143,7 @@ class QueueMaster extends IoMaster
$qm = QueueManager::get();
$qm->setActiveGroup('main');
$managers[] = $qm;
$managers[] = $this->processManager;
}
Event::handle('EndQueueDaemonIoManagers', array(&$managers));

View File

@@ -55,7 +55,7 @@ class XMPPDaemon extends SpawningDaemon
{
common_log(LOG_INFO, 'Waiting to listen to XMPP and queues');
$master = new XmppMaster($this->get_id());
$master = new XmppMaster($this->get_id(), $this->processManager());
$master->init($this->allsites);
$master->service();
@@ -68,6 +68,14 @@ class XMPPDaemon extends SpawningDaemon
class XmppMaster extends IoMaster
{
protected $processManager;
function __construct($id, $processManager)
{
parent::__construct($id);
$this->processManager = $processManager;
}
/**
* Initialize IoManagers for the currently configured site
* which are appropriate to this instance.
@@ -79,6 +87,7 @@ class XmppMaster extends IoMaster
$qm->setActiveGroup('xmpp');
$this->instantiate($qm);
$this->instantiate(XmppManager::get());
$this->instantiate($this->processManager);
}
}
}