Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/50201


Change subject: Various job queue documentation tweaks.
......................................................................

Various job queue documentation tweaks.

Change-Id: I2fcd2470f4e9e29d44cccc9e4d82d0380fe48434
---
M includes/job/JobQueue.php
M includes/job/JobQueueGroup.php
2 files changed, 18 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/50201/1

diff --git a/includes/job/JobQueue.php b/includes/job/JobQueue.php
index f02ed98..4996a9e 100644
--- a/includes/job/JobQueue.php
+++ b/includes/job/JobQueue.php
@@ -164,6 +164,7 @@
        /**
         * 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 @@
        /**
         * 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 @@
        /**
         * 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 @@
         * 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 @@
         * @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." );
        }
 }
diff --git a/includes/job/JobQueueGroup.php b/includes/job/JobQueueGroup.php
index 32c881f..23a5494 100644
--- a/includes/job/JobQueueGroup.php
+++ b/includes/job/JobQueueGroup.php
@@ -75,8 +75,10 @@
        }
 
        /**
+        * 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 @@
 
        /**
         * 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
@@ -132,6 +136,9 @@
 
        /**
         * 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
@@ -283,6 +290,10 @@
                return $count;
        }
 
+       /**
+        * @param $name string
+        * @return mixed
+        */
        private function getCachedConfigVar( $name ) {
                global $wgConf, $wgMemc;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/50201
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fcd2470f4e9e29d44cccc9e4d82d0380fe48434
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to