Include cluster name in JobQueueDB cache keys.
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 21 Apr 2013 21:56:20 +0000 (14:56 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 23 Apr 2013 18:30:52 +0000 (11:30 -0700)
* This makes it work properly with JobQueueFederated.

Change-Id: I0309dee7e97fa3813dfa5f1ae1eb1fcbca14b829

includes/job/JobQueueDB.php

index e8e0385..27e927c 100644 (file)
@@ -689,7 +689,8 @@ class JobQueueDB extends JobQueue {
         */
        private function getCacheKey( $property ) {
                list( $db, $prefix ) = wfSplitWikiID( $this->wiki );
-               return wfForeignMemcKey( $db, $prefix, 'jobqueue', $this->type, $property );
+               $cluster = is_string( $this->cluster ) ? $this->cluster : 'main';
+               return wfForeignMemcKey( $db, $prefix, 'jobqueue', $cluster, $this->type, $property );
        }
 
        /**