Merge "Made root job de-duplication work without cache setup"
[lhc/web/wiklou.git] / includes / job / JobQueueDB.php
index 2052fc1..7840f14 100644 (file)
@@ -519,7 +519,7 @@ class JobQueueDB extends JobQueue {
                // maintained. Having only the de-duplication registration succeed would cause
                // jobs to become no-ops without any actual jobs that made them redundant.
                list( $dbw, $scope ) = $this->getMasterDB();
-               $cache = $this->cache;
+               $cache = $this->dupCache;
                $dbw->onTransactionIdle( function() use ( $cache, $params, $key, $scope ) {
                        $timestamp = $cache->get( $key ); // current last timestamp of this job
                        if ( $timestamp && $timestamp >= $params['rootJobTimestamp'] ) {
@@ -605,7 +605,9 @@ class JobQueueDB extends JobQueue {
        }
 
        public function getCoalesceLocationInternal() {
-               return $this->cluster ? "DBCluster:{$this->cluster}" : "LBFactory:{$this->wiki}";
+               return $this->cluster
+                       ? "DBCluster:{$this->cluster}:{$this->wiki}"
+                       : "LBFactory:{$this->wiki}";
        }
 
        protected function doGetSiblingQueuesWithJobs( array $types ) {