22use Psr\Log\LoggerInterface;
55 $params[
'redisConfig'][
'serializer'] =
'none';
57 $this->logger = \MediaWiki\Logger\LoggerFactory::getInstance(
'redis' );
76 if ( is_array( $map ) && isset( $map[
'_epoch'] ) ) {
77 unset( $map[
'_epoch'] );
79 foreach ( $map as $key =>
$time ) {
81 $pendingDBs[
$type][] = $wiki;
84 throw new UnexpectedValueException(
85 "No queue listing found; make sure redisJobChronService is running."
90 }
catch ( RedisException
$e ) {
91 $this->redisPool->handleError( $conn,
$e );
109 foreach ( $this->
servers as $server ) {
110 $conn = $this->redisPool->getConnection( $server, $this->logger );
123 return "jobqueue:aggregator:h-ready-queues:v2";
131 list(
$type, $wiki ) = explode(
'/', $name, 2 );
133 return [ rawurldecode(
$type ), rawurldecode( $wiki ) ];
Class to handle tracking information about all queues using PhpRedis.
doNotifyQueueNonEmpty( $wiki, $type)
__construct(array $params)
doGetAllReadyWikiQueues()
array $servers
List of Redis server addresses.
doNotifyQueueEmpty( $wiki, $type)
RedisConnectionPool $redisPool
getConnection()
Get a connection to the server that handles all sub-queues for this queue.
Class to handle tracking information about all queues.
Helper class to manage Redis connections.
static singleton(array $options)
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
see documentation in includes Linker php for Linker::makeImageLink & $time
returning false will NOT prevent logging $e
storage can be distributed across multiple servers