This further limits how long the server can be tied up by push().
Change-Id: I02d242578dadc19912c9fccfdcf5e15c5eb78e9e
/** @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().
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;