use ApiStashEdit;
use CategoryMembershipChangeJob;
-use RefreshSecondaryDataUpdate;
use Content;
use ContentHandler;
use DataUpdate;
$update->setRevision( $legacyRevision );
$update->setTriggeringUser( $triggeringUser );
}
- }
- if ( $options['defer'] === false ) {
- foreach ( $updates as $update ) {
+ if ( $options['defer'] === false ) {
if ( $update instanceof DataUpdate && $options['transactionTicket'] !== null ) {
$update->setTransactionTicket( $options['transactionTicket'] );
}
$update->doUpdate();
+ } else {
+ DeferredUpdates::addUpdate( $update, $options['defer'] );
}
- } else {
- $cacheTime = $this->getCanonicalParserOutput()->getCacheTime();
- // Bundle all of the data updates into a single deferred update wrapper so that
- // any failure will cause at most one refreshLinks job to be enqueued by
- // DeferredUpdates::doUpdates(). This is hard to do when there are many separate
- // updates that are not defined as being related.
- $update = new RefreshSecondaryDataUpdate(
- $this->wikiPage,
- $updates,
- $options,
- $cacheTime,
- $this->loadbalancerFactory->getLocalDomainID()
- );
- $update->setRevision( $legacyRevision );
- $update->setTriggeringUser( $triggeringUser );
- DeferredUpdates::addUpdate( $update, $options['defer'] );
}
}