* @file
* @author Aaron Schulz
*/
+use Psr\Log\LoggerInterface;
/**
* Class to handle tracking information about all queues using PhpRedis
class JobQueueAggregatorRedis extends JobQueueAggregator {
/** @var RedisConnectionPool */
protected $redisPool;
+ /** @var LoggerInterface */
+ protected $logger;
/** @var array List of Redis server addresses */
protected $servers;
: [ $params['redisServer'] ]; // b/c
$params['redisConfig']['serializer'] = 'none';
$this->redisPool = RedisConnectionPool::singleton( $params['redisConfig'] );
+ $this->logger = \MediaWiki\Logger\LoggerFactory::getInstance( 'redis' );
}
protected function doNotifyQueueEmpty( $wiki, $type ) {
protected function getConnection() {
$conn = false;
foreach ( $this->servers as $server ) {
- $conn = $this->redisPool->getConnection( $server );
+ $conn = $this->redisPool->getConnection( $server, $this->logger );
if ( $conn ) {
break;
}
/**
* @param string $name
- * @return string
+ * @return string[]
*/
private function decodeQueueName( $name ) {
list( $type, $wiki ) = explode( '/', $name, 2 );