Make DeferredUpdates enqueue updates that failed to run when possible
Bug: T206288 Bug: T206283 Change-Id: I6025bcc7d68cf214d291191d4044a66cdeff108b
This commit is contained in:
parent
500cbe99b6
commit
0ef02cd018
1 changed files with 10 additions and 0 deletions
|
|
@ -280,6 +280,16 @@ class DeferredUpdates {
|
||||||
}
|
}
|
||||||
MWExceptionHandler::rollbackMasterChangesAndLog( $e );
|
MWExceptionHandler::rollbackMasterChangesAndLog( $e );
|
||||||
|
|
||||||
|
// Try to push the update as a job so it can run later perhaps
|
||||||
|
if ( $mode !== 'enqueue' && $update instanceof EnqueueableDataUpdate ) {
|
||||||
|
try {
|
||||||
|
$spec = $update->getAsJobSpecification();
|
||||||
|
JobQueueGroup::singleton( $spec['wiki'] )->push( $spec['job'] );
|
||||||
|
} catch ( Exception $e ) {
|
||||||
|
MWExceptionHandler::rollbackMasterChangesAndLog( $e );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// VW-style hack to work around T190178, so we can make sure
|
// VW-style hack to work around T190178, so we can make sure
|
||||||
// PageMetaDataUpdater doesn't throw exceptions.
|
// PageMetaDataUpdater doesn't throw exceptions.
|
||||||
if ( defined( 'MW_PHPUNIT_TEST' ) ) {
|
if ( defined( 'MW_PHPUNIT_TEST' ) ) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue