X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fjobqueue%2FJobQueueRedis.php;h=7dad014e45151c70d81b961c59ddae28932f476e;hb=89539f2aa1b158fdcc703ad053e2580cb97a6385;hp=c2c9d66119910afc3f4bf433818e0b908aff9c63;hpb=576a39f6fac711e0d0a39f2c74825e5d5334b56e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/jobqueue/JobQueueRedis.php b/includes/jobqueue/JobQueueRedis.php index c2c9d66119..7dad014e45 100644 --- a/includes/jobqueue/JobQueueRedis.php +++ b/includes/jobqueue/JobQueueRedis.php @@ -18,7 +18,6 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @author Aaron Schulz */ use Psr\Log\LoggerInterface; @@ -75,6 +74,8 @@ class JobQueueRedis extends JobQueue { /** @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(). @@ -212,7 +213,7 @@ class JobQueueRedis extends JobQueue { 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;