Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap
[lhc/web/wiklou.git] / includes / jobqueue / jobs / RecentChangesUpdateJob.php
index 223ae32..2d4ce34 100644 (file)
@@ -73,9 +73,8 @@ class RecentChangesUpdateJob extends Job {
        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;
@@ -128,7 +127,7 @@ class RecentChangesUpdateJob extends Job {
                $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.