Merge "Introduce InterwikiLookupAdapter on top of SiteLookup"
[lhc/web/wiklou.git] / includes / jobqueue / JobRunner.php
index 022abd9..0469eeb 100644 (file)
@@ -26,6 +26,7 @@ use MediaWiki\Logger\LoggerFactory;
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
+use Wikimedia\ScopedCallback;
 
 /**
  * Job queue runner utility methods
@@ -280,11 +281,10 @@ class JobRunner implements LoggerAwareInterface {
                        MWExceptionHandler::rollbackMasterChangesAndLog( $e );
                        $status = false;
                        $error = get_class( $e ) . ': ' . $e->getMessage();
-                       MWExceptionHandler::logException( $e );
                }
                // Always attempt to call teardown() even if Job throws exception.
                try {
-                       $job->teardown();
+                       $job->teardown( $status );
                } catch ( Exception $e ) {
                        MWExceptionHandler::logException( $e );
                }