END_OF_IM_HELP;
-require_once INSTALLDIR.'/scripts/commandline.inc';
+require_once INSTALLDIR.'/scripts/commandline.inc.php';
class ImDaemon extends SpawningDaemon
{
{
common_log(LOG_INFO, 'Waiting to listen to IM connections and queues');
- $master = new ImMaster($this->get_id());
+ $master = new ImMaster($this->get_id(), $this->processManager());
$master->init($this->allsites);
$master->service();
class ImMaster 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.
$qm = QueueManager::get();
$qm->setActiveGroup('im');
$classes[] = $qm;
+ $classes[] = $this->processManager;
}
Event::handle('EndImDaemonIoManagers', array(&$classes));
foreach ($classes as $class) {