Merge "Removed useless JobQueue return values"
[lhc/web/wiklou.git] / includes / jobqueue / JobQueue.php
index 2d7103c..9b13aea 100644 (file)
@@ -304,11 +304,11 @@ abstract class JobQueue {
         *
         * @param Job|array $jobs A single job or an array of Jobs
         * @param int $flags Bitfield (supports JobQueue::QOS_ATOMIC)
-        * @return bool Returns false on failure
+        * @return void
         * @throws JobQueueError
         */
        final public function push( $jobs, $flags = 0 ) {
-               return $this->batchPush( is_array( $jobs ) ? $jobs : array( $jobs ), $flags );
+               $this->batchPush( is_array( $jobs ) ? $jobs : array( $jobs ), $flags );
        }
 
        /**
@@ -318,8 +318,8 @@ abstract class JobQueue {
         *
         * @param array $jobs List of Jobs
         * @param int $flags Bitfield (supports JobQueue::QOS_ATOMIC)
+        * @return void
         * @throws MWException
-        * @return bool Returns false on failure
         */
        final public function batchPush( array $jobs, $flags = 0 ) {
                if ( !count( $jobs ) ) {
@@ -337,17 +337,14 @@ abstract class JobQueue {
                }
 
                wfProfileIn( __METHOD__ );
-               $ok = $this->doBatchPush( $jobs, $flags );
+               $this->doBatchPush( $jobs, $flags );
                wfProfileOut( __METHOD__ );
-
-               return $ok;
        }
 
        /**
         * @see JobQueue::batchPush()
         * @param array $jobs
         * @param $flags
-        * @return bool
         */
        abstract protected function doBatchPush( array $jobs, $flags );
 
@@ -399,24 +396,21 @@ abstract class JobQueue {
         * Outside callers should use JobQueueGroup::ack() instead of this function.
         *
         * @param Job $job
+        * @return void
         * @throws MWException
-        * @return bool
         */
        final public function ack( Job $job ) {
                if ( $job->getType() !== $this->type ) {
                        throw new MWException( "Got '{$job->getType()}' job; expected '{$this->type}'." );
                }
                wfProfileIn( __METHOD__ );
-               $ok = $this->doAck( $job );
+               $this->doAck( $job );
                wfProfileOut( __METHOD__ );
-
-               return $ok;
        }
 
        /**
         * @see JobQueue::ack()
         * @param Job $job
-        * @return bool
         */
        abstract protected function doAck( Job $job );
 
@@ -539,22 +533,19 @@ abstract class JobQueue {
        /**
         * Deleted all unclaimed and delayed jobs from the queue
         *
-        * @return bool Success
         * @throws JobQueueError
         * @since 1.22
+        * @return void
         */
        final public function delete() {
                wfProfileIn( __METHOD__ );
-               $res = $this->doDelete();
+               $this->doDelete();
                wfProfileOut( __METHOD__ );
-
-               return $res;
        }
 
        /**
         * @see JobQueue::delete()
         * @throws MWException
-        * @return bool Success
         */
        protected function doDelete() {
                throw new MWException( "This method is not implemented." );