protected function purgeExpiredRows() {
global $wgRCMaxAge, $wgUpdateRowsPerQuery;
- $lockKey = wfWikiID() . ':recentchanges-prune';
-
$dbw = wfGetDB( DB_MASTER );
+ $lockKey = $dbw->getDomainID() . ':recentchanges-prune';
if ( !$dbw->lock( $lockKey, __METHOD__, 0 ) ) {
// already in progress
return;
$factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
$ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
- $lockKey = wfWikiID() . '-activeusers';
+ $lockKey = $dbw->getDomainID() . '-activeusers';
if ( !$dbw->lock( $lockKey, __METHOD__, 0 ) ) {
// Exclusive update (avoids duplicate entries)… it's usually fine to just
// drop out here, if the Job is already running.