dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Special:Newpages feed now shows first revision instead of latest revision"
[lhc/web/wiklou.git]
/
includes
/
jobqueue
/
JobQueueRedis.php
diff --git
a/includes/jobqueue/JobQueueRedis.php
b/includes/jobqueue/JobQueueRedis.php
index
c2c9d66
..
7dad014
100644
(file)
--- a/
includes/jobqueue/JobQueueRedis.php
+++ b/
includes/jobqueue/JobQueueRedis.php
@@
-18,7
+18,6
@@
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @author Aaron Schulz
*/
use Psr\Log\LoggerInterface;
*/
use Psr\Log\LoggerInterface;
@@
-75,6
+74,8
@@
class JobQueueRedis extends JobQueue {
/** @var string Compression method to use */
protected $compression;
/** @var string Compression method to use */
protected $compression;
+ const MAX_PUSH_SIZE = 25; // avoid tying up the server
+
/**
* @param array $params Possible keys:
* - redisConfig : An array of parameters to RedisConnectionPool::__construct().
/**
* @param array $params Possible keys:
* - redisConfig : An array of parameters to RedisConnectionPool::__construct().
@@
-212,7
+213,7
@@
class JobQueueRedis extends JobQueue {
if ( $flags & self::QOS_ATOMIC ) {
$batches = [ $items ]; // all or nothing
} else {
if ( $flags & self::QOS_ATOMIC ) {
$batches = [ $items ]; // all or nothing
} else {
- $batches = array_chunk( $items,
100 ); // avoid tying up the server
+ $batches = array_chunk( $items,
self::MAX_PUSH_SIZE );
}
$failed = 0;
$pushed = 0;
}
$failed = 0;
$pushed = 0;