*
* Hook for RouterInitialized event.
*
- * @param Mapper &$m URL parser and mapper
+ * @param Mapper $m URL parser and mapper
*
* @return boolean hook return
*/
- function onRouterInitialized(&$m)
+ function onRouterInitialized($m)
{
$m->connect('/main/rsscloud/request_notify',
array('action' => 'RSSCloudRequestNotify'));
case 'RSSCloudNotifier':
include_once INSTALLDIR . '/plugins/RSSCloud/RSSCloudNotifier.php';
return false;
+ case 'RSSCloudQueueHandler':
+ include_once INSTALLDIR . '/plugins/RSSCloud/RSSCloudQueueHandler.php';
+ return false;
case 'RSSCloudRequestNotifyAction':
case 'LoggingAggregatorAction':
include_once INSTALLDIR . '/plugins/RSSCloud/' .
return true;
}
- /**
- * broadcast the message when not using queuehandler
- *
- * @param Notice &$notice the notice
- * @param array $queue destination queue
- *
- * @return boolean hook return
- */
-
- function onUnqueueHandleNotice(&$notice, $queue)
- {
- if (($queue == 'rsscloud') && ($this->_isLocal($notice))) {
-
- common_debug('broadcasting rssCloud bound notice ' . $notice->id);
-
- $profile = $notice->getProfile();
-
- $notifier = new RSSCloudNotifier();
- $notifier->notify($profile);
-
- return false;
- }
-
- return true;
- }
-
/**
* Determine whether the notice was locally created
*
}
/**
- * Add RSSCloudQueueHandler to the list of valid daemons to
- * start
+ * Register RSSCloud notice queue handler
*
- * @param array $daemons the list of daemons to run
+ * @param QueueManager $manager
*
* @return boolean hook return
- *
*/
-
- function onGetValidDaemons($daemons)
+ function onEndInitializeQueueManager($manager)
{
- array_push($daemons, INSTALLDIR .
- '/plugins/RSSCloud/RSSCloudQueueHandler.php');
+ $manager->connect('rsscloud', 'RSSCloudQueueHandler');
return true;
}