Stop doing $that = $this in includes/jobqueue
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueRedis.php
index 67420f0..408828d 100644 (file)
@@ -186,7 +186,7 @@ class JobQueueRedis extends JobQueue {
 
        /**
         * @see JobQueue::doBatchPush()
-        * @param array $jobs
+        * @param IJobSpecification[] $jobs
         * @param int $flags
         * @return void
         * @throws JobQueueError
@@ -573,12 +573,10 @@ LUA;
         * @return MappedIterator
         */
        protected function getJobIterator( RedisConnRef $conn, array $uids ) {
-               $that = $this;
-
                return new MappedIterator(
                        $uids,
-                       function ( $uid ) use ( $that, $conn ) {
-                               return $that->getJobFromUidInternal( $uid, $conn );
+                       function ( $uid ) use ( $conn ) {
+                               return $this->getJobFromUidInternal( $uid, $conn );
                        },
                        array( 'accept' => function ( $job ) {
                                return is_object( $job );
@@ -749,7 +747,8 @@ LUA;
        protected function getConnection() {
                $conn = $this->redisPool->getConnection( $this->server );
                if ( !$conn ) {
-                       throw new JobQueueConnectionError( "Unable to connect to redis server." );
+                       throw new JobQueueConnectionError(
+                               "Unable to connect to redis server {$this->server}." );
                }
 
                return $conn;