* @param array $cats
*/
function invalidateCategories( $cats ) {
- $this->invalidatePages( NS_CATEGORY, array_keys( $cats ) );
+ PurgeJobUtils::invalidatePages( $this->mDb, NS_CATEGORY, array_keys( $cats ) );
}
/**
* @param array $images
*/
function invalidateImageDescriptions( $images ) {
- $this->invalidatePages( NS_FILE, array_keys( $images ) );
+ PurgeJobUtils::invalidatePages( $this->mDb, NS_FILE, array_keys( $images ) );
}
/**
foreach ( $deleteWheres as $deleteWhere ) {
$this->mDb->delete( $table, $deleteWhere, __METHOD__ );
- $factory->commitMasterChanges( __METHOD__ );
- $factory->waitForReplication( [ 'wiki' => $this->mDb->getWikiID() ] );
+ $factory->commitAndWaitForReplication(
+ __METHOD__, $this->ticket, [ 'wiki' => $this->mDb->getWikiID() ]
+ );
}
$insertBatches = array_chunk( $insertions, $bSize );
foreach ( $insertBatches as $insertBatch ) {
$this->mDb->insert( $table, $insertBatch, __METHOD__, 'IGNORE' );
- $factory->commitMasterChanges( __METHOD__ );
- $factory->waitForReplication( [ 'wiki' => $this->mDb->getWikiID() ] );
+ $factory->commitAndWaitForReplication(
+ __METHOD__, $this->ticket, [ 'wiki' => $this->mDb->getWikiID() ]
+ );
}
if ( count( $insertions ) ) {