@@ 91-95 (lines=5) @@ | ||
88 | $catBatches = array_chunk( $cats, $batchSize ); |
|
89 | foreach ( $catBatches as $catBatch ) { |
|
90 | $this->page->updateCategoryCounts( [], $catBatch, $id ); |
|
91 | if ( count( $catBatches ) > 1 ) { |
|
92 | $lbFactory->commitAndWaitForReplication( |
|
93 | __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ] |
|
94 | ); |
|
95 | } |
|
96 | } |
|
97 | ||
98 | // Refresh the category table entry if it seems to have no pages. Check |
|
@@ 183-187 (lines=5) @@ | ||
180 | $rcIdBatches = array_chunk( array_merge( $rcIdsForTitle, $rcIdsForPage ), $batchSize ); |
|
181 | foreach ( $rcIdBatches as $rcIdBatch ) { |
|
182 | $dbw->delete( 'recentchanges', [ 'rc_id' => $rcIdBatch ], __METHOD__ ); |
|
183 | if ( count( $rcIdBatches ) > 1 ) { |
|
184 | $lbFactory->commitAndWaitForReplication( |
|
185 | __METHOD__, $this->ticket, [ 'wiki' => $dbw->getWikiID() ] |
|
186 | ); |
|
187 | } |
|
188 | } |
|
189 | ||
190 | // Commit and release the lock (if set) |