36 if ( $dbkeys === [] ) {
44 function () use ( $dbw, $namespace, $dbkeys, $fname ) {
45 $services = MediaWikiServices::getInstance();
46 $lbFactory = $services->getDBLoadBalancerFactory();
55 'page_namespace' => $namespace,
56 'page_title' => $dbkeys,
57 'page_touched < ' . $dbw->
addQuotes( $now )
66 $batchSize = $services->getMainConfig()->get(
'UpdateRowsPerQuery' );
67 $ticket = $lbFactory->getEmptyTransactionTicket( $fname );
68 $idBatches = array_chunk( $ids, $batchSize );
69 foreach ( $idBatches as $idBatch ) {
72 [
'page_touched' => $now ],
74 'page_id' => $idBatch,
75 'page_touched < ' . $dbw->
addQuotes( $now )
79 if ( count( $idBatches ) > 1 ) {
80 $lbFactory->commitAndWaitForReplication( $fname, $ticket );