From: Aaron Schulz Date: Mon, 2 Mar 2015 19:15:40 +0000 (-0800) Subject: Moved JobQueueFederated partition exceptions to their own log X-Git-Tag: 1.31.0-rc.0~12233^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=32684df25f8700b736bdf6532e3d629cb79c845e;p=lhc%2Fweb%2Fwiklou.git Moved JobQueueFederated partition exceptions to their own log Change-Id: If495e9b1a631b587cb3b8d83974837eef1d2d4c6 --- diff --git a/includes/jobqueue/JobQueueFederated.php b/includes/jobqueue/JobQueueFederated.php index 4186204d60..246c06e770 100644 --- a/includes/jobqueue/JobQueueFederated.php +++ b/includes/jobqueue/JobQueueFederated.php @@ -160,7 +160,7 @@ class JobQueueFederated extends JobQueue { $empty = $empty && $queue->doIsEmpty(); } catch ( JobQueueError $e ) { ++$failed; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); } } $this->throwErrorIfAllPartitionsDown( $failed ); @@ -204,7 +204,7 @@ class JobQueueFederated extends JobQueue { $count += $queue->$method(); } catch ( JobQueueError $e ) { ++$failed; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); } } $this->throwErrorIfAllPartitionsDown( $failed ); @@ -277,7 +277,7 @@ class JobQueueFederated extends JobQueue { $queue->doBatchPush( $jobBatch, $flags | self::QOS_ATOMIC ); } catch ( JobQueueError $e ) { $ok = false; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); } if ( $ok ) { $key = $this->getCacheKey( 'empty' ); @@ -299,7 +299,7 @@ class JobQueueFederated extends JobQueue { $queue->doBatchPush( $jobBatch, $flags | self::QOS_ATOMIC ); } catch ( JobQueueError $e ) { $ok = false; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); } if ( $ok ) { $key = $this->getCacheKey( 'empty' ); @@ -331,7 +331,7 @@ class JobQueueFederated extends JobQueue { $job = $queue->pop(); } catch ( JobQueueError $e ) { ++$failed; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); $job = false; } if ( $job ) { @@ -398,7 +398,7 @@ class JobQueueFederated extends JobQueue { $queue->doDelete(); } catch ( JobQueueError $e ) { ++$failed; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); } } $this->throwErrorIfAllPartitionsDown( $failed ); @@ -413,7 +413,7 @@ class JobQueueFederated extends JobQueue { $queue->waitForBackups(); } catch ( JobQueueError $e ) { ++$failed; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); } } $this->throwErrorIfAllPartitionsDown( $failed ); @@ -495,7 +495,7 @@ class JobQueueFederated extends JobQueue { } } catch ( JobQueueError $e ) { ++$failed; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); } } $this->throwErrorIfAllPartitionsDown( $failed ); @@ -519,7 +519,7 @@ class JobQueueFederated extends JobQueue { } } catch ( JobQueueError $e ) { ++$failed; - MWExceptionHandler::logException( $e ); + $this->logException( $e ); } } $this->throwErrorIfAllPartitionsDown( $failed ); @@ -527,6 +527,10 @@ class JobQueueFederated extends JobQueue { return $result; } + protected function logException( Exception $e ) { + wfDebugLog( 'JobQueueFederated', $e->getMessage() . "\n" . $e->getTraceAsString() ); + } + /** * Throw an error if no partitions available *