Merge "Made sql.php except a "cluster" option and cleaned up the arguments."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 21 Feb 2013 21:51:06 +0000 (21:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 21 Feb 2013 21:51:06 +0000 (21:51 +0000)
includes/job/JobQueue.php
includes/job/JobQueueGroup.php
maintenance/storage/blobs.sql

index f02ed98..4996a9e 100644 (file)
@@ -164,6 +164,7 @@ abstract class JobQueue {
        /**
         * Push a single jobs into the queue.
         * This does not require $wgJobClasses to be set for the given job type.
+        * Outside callers should use JobQueueGroup::push() instead of this function.
         *
         * @param $jobs Job|Array
         * @param $flags integer Bitfield (supports JobQueue::QoS_Atomic)
@@ -177,6 +178,7 @@ abstract class JobQueue {
        /**
         * Push a batch of jobs into the queue.
         * This does not require $wgJobClasses to be set for the given job type.
+        * Outside callers should use JobQueueGroup::push() instead of this function.
         *
         * @param $jobs array List of Jobs
         * @param $flags integer Bitfield (supports JobQueue::QoS_Atomic)
@@ -208,6 +210,7 @@ abstract class JobQueue {
        /**
         * Pop a job off of the queue.
         * This requires $wgJobClasses to be set for the given job type.
+        * Outside callers should use JobQueueGroup::pop() instead of this function.
         *
         * @return Job|bool Returns false if there are no jobs
         * @throws MWException
@@ -238,6 +241,7 @@ abstract class JobQueue {
         * Acknowledge that a job was completed.
         *
         * This does nothing for certain queue classes or if "claimTTL" is not set.
+        * Outside callers should use JobQueueGroup::ack() instead of this function.
         *
         * @param $job Job
         * @return bool
@@ -382,6 +386,6 @@ abstract class JobQueue {
         * @throws MWException
         */
        public function setTestingPrefix( $key ) {
-               throw new MWException( "Queue namespacing not support for this queue type." );
+               throw new MWException( "Queue namespacing not supported for this queue type." );
        }
 }
index 32c881f..23a5494 100644 (file)
@@ -75,8 +75,10 @@ class JobQueueGroup {
        }
 
        /**
+        * Get the job queue object for a given queue type
+        *
         * @param $type string
-        * @return JobQueue Job queue object for a given queue type
+        * @return JobQueue
         */
        public function get( $type ) {
                global $wgJobTypeConf;
@@ -93,7 +95,9 @@ class JobQueueGroup {
 
        /**
         * Insert jobs into the respective queues of with the belong.
-        * This inserts the jobs into the queue specified by $wgJobTypeConf.
+        *
+        * This inserts the jobs into the queue specified by $wgJobTypeConf
+        * and updates the aggregate job queue information cache as needed.
         *
         * @param $jobs Job|array A single Job or a list of Jobs
         * @throws MWException
@@ -133,6 +137,9 @@ class JobQueueGroup {
        /**
         * Pop a job off one of the job queues
         *
+        * This pops a job off a queue as specified by $wgJobTypeConf and
+        * updates the aggregate job queue information cache as needed.
+        *
         * @param $qtype integer|string JobQueueGroup::TYPE_DEFAULT or type string
         * @param $flags integer Bitfield of JobQueueGroup::USE_* constants
         * @return Job|bool Returns false on failure
@@ -283,6 +290,10 @@ class JobQueueGroup {
                return $count;
        }
 
+       /**
+        * @param $name string
+        * @return mixed
+        */
        private function getCachedConfigVar( $name ) {
                global $wgConf, $wgMemc;
 
index 623dd7b..979e68a 100644 (file)
@@ -4,5 +4,4 @@ CREATE TABLE /*$wgDBprefix*/blobs (
        blob_id integer UNSIGNED NOT NULL AUTO_INCREMENT,
        blob_text longblob,
        PRIMARY KEY  (blob_id)
-) ENGINE=MyISAM MAX_ROWS=100000000 AVG_ROW_LENGTH=100000;
-
+) ENGINE=InnoDB;