Merge "Removed overzealous caching from JobQueueFederated"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 4 Mar 2015 05:48:38 +0000 (05:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 4 Mar 2015 05:48:38 +0000 (05:48 +0000)
1  2 
includes/jobqueue/JobQueueFederated.php

@@@ -277,12 -251,9 +251,9 @@@ class JobQueueFederated extends JobQueu
                                $queue->doBatchPush( $jobBatch, $flags | self::QOS_ATOMIC );
                        } catch ( JobQueueError $e ) {
                                $ok = false;
 -                              MWExceptionHandler::logException( $e );
 +                              $this->logException( $e );
                        }
-                       if ( $ok ) {
-                               $key = $this->getCacheKey( 'empty' );
-                               $this->cache->set( $key, 'false', self::CACHE_TTL_LONG );
-                       } else {
+                       if ( !$ok ) {
                                if ( !$partitionRing->ejectFromLiveRing( $partition, 5 ) ) { // blacklist
                                        throw new JobQueueError( "Could not insert job(s), no partitions available." );
                                }
                                $queue->doBatchPush( $jobBatch, $flags | self::QOS_ATOMIC );
                        } catch ( JobQueueError $e ) {
                                $ok = false;
 -                              MWExceptionHandler::logException( $e );
 +                              $this->logException( $e );
                        }
-                       if ( $ok ) {
-                               $key = $this->getCacheKey( 'empty' );
-                               $this->cache->set( $key, 'false', self::CACHE_TTL_LONG );
-                       } else {
+                       if ( !$ok ) {
                                if ( !$partitionRing->ejectFromLiveRing( $partition, 5 ) ) { // blacklist
                                        throw new JobQueueError( "Could not insert job(s), no partitions available." );
                                }