diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-10 11:57:38 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-10 11:57:38 -0800 |
commit | 6d73fc1d5439439cca5a6af3f05b39bdf4ef20aa (patch) | |
tree | a8c42e638863fb4421c168fa7a125a5cfcc189b2 /scripts | |
parent | 9b75e162c7002c1f29fa4ba6c1bfab7fb6b163f8 (diff) | |
parent | 54ff17010b145f5262fa57b6367b22ca02deb343 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/queuedaemon.php | 11 | ||||
-rwxr-xr-x | scripts/xmppdaemon.php | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/scripts/queuedaemon.php b/scripts/queuedaemon.php index 6dba16f95..582a3dd88 100755 --- a/scripts/queuedaemon.php +++ b/scripts/queuedaemon.php @@ -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)); diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index 9302f0c43..26c7991b8 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -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); } } } |