Bug: T166757
Change-Id: Ie59523a8b3315f063c914cd25d7b53c11e03fbcd
__METHOD__
);
if ( $row ) {
- Category::newFromRow( $row, $title )->refreshCounts();
+ $cat = Category::newFromRow( $row, $title );
+ // T166757: do the update after the main job DB commit
+ DeferredUpdates::addCallableUpdate( function () use ( $cat ) {
+ $cat->refreshCounts();
+ } );
}
}
);
foreach ( $rows as $row ) {
$cat = Category::newFromRow( $row );
- $cat->refreshCounts();
+ // T166757: do the update after this DB commit
+ DeferredUpdates::addCallableUpdate( function () use ( $cat ) {
+ $cat->refreshCounts();
+ } );
}
}
}