Replace deprecated lSize with lLen
authorPaladox <thomasmulhall410@yahoo.com>
Tue, 3 Dec 2019 18:12:47 +0000 (18:12 +0000)
committerPaladox <thomasmulhall410@yahoo.com>
Thu, 5 Dec 2019 19:51:32 +0000 (19:51 +0000)
lSize is an alias to lLen according to [1]

[1] https://github.com/phpredis/phpredis/blob/9f4ededa4139f0af324aab56773f26be5a9d1783/README.markdown#L2148

Bug: T239734
Change-Id: I5b72fbe61e313511b69e8d2e96c2042742370b85
(cherry picked from commit fac9054e3f894962b92304fb9ca610f07b0b8549)

includes/jobqueue/JobQueueRedis.php

index ba00463..48bd122 100644 (file)
@@ -134,7 +134,7 @@ class JobQueueRedis extends JobQueue {
        protected function doGetSize() {
                $conn = $this->getConnection();
                try {
-                       return $conn->lSize( $this->getQueueKey( 'l-unclaimed' ) );
+                       return $conn->lLen( $this->getQueueKey( 'l-unclaimed' ) );
                } catch ( RedisException $e ) {
                        throw $this->handleErrorAndMakeException( $conn, $e );
                }
@@ -608,7 +608,7 @@ LUA;
                try {
                        $conn->multi( Redis::PIPELINE );
                        foreach ( $types as $type ) {
-                               $conn->lSize( $this->getQueueKey( 'l-unclaimed', $type ) );
+                               $conn->lLen( $this->getQueueKey( 'l-unclaimed', $type ) );
                        }
                        $res = $conn->exec();
                        if ( is_array( $res ) ) {