Remove unused job ID parameter from jobs
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 17 Dec 2013 08:26:57 +0000 (00:26 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 17 Dec 2013 08:26:57 +0000 (00:26 -0800)
Change-Id: I2bedd0ff311bff027d998f193d6cb799d70d2a93

includes/job/Job.php
includes/job/jobs/AssembleUploadChunksJob.php
includes/job/jobs/DoubleRedirectJob.php
includes/job/jobs/EmaillingJob.php
includes/job/jobs/EnotifNotifyJob.php
includes/job/jobs/HTMLCacheUpdateJob.php
includes/job/jobs/NullJob.php
includes/job/jobs/PublishStashedFileJob.php
includes/job/jobs/RefreshLinksJob.php
includes/job/jobs/RefreshLinksJob2.php
includes/job/jobs/UploadFromUrlJob.php

index f08a367..77652a4 100644 (file)
@@ -66,16 +66,15 @@ abstract class Job {
         * @param string $command Job command
         * @param Title $title Associated title
         * @param array|bool $params Job parameters
-        * @param int $id Job identifier
         * @throws MWException
         * @return Job
         */
-       public static function factory( $command, Title $title, $params = false, $id = 0 ) {
+       public static function factory( $command, Title $title, $params = false ) {
                global $wgJobClasses;
                if ( isset( $wgJobClasses[$command] ) ) {
                        $class = $wgJobClasses[$command];
 
-                       return new $class( $title, $params, $id );
+                       return new $class( $title, $params );
                }
                throw new MWException( "Invalid job command `{$command}`" );
        }
index eff16b9..19b0558 100644 (file)
@@ -27,8 +27,8 @@
  * @ingroup Upload
  */
 class AssembleUploadChunksJob extends Job {
-       public function __construct( $title, $params, $id = 0 ) {
-               parent::__construct( 'AssembleUploadChunks', $title, $params, $id );
+       public function __construct( $title, $params ) {
+               parent::__construct( 'AssembleUploadChunks', $title, $params );
                $this->removeDuplicates = true;
        }
 
index f5f0d63..99d7527 100644 (file)
@@ -86,8 +86,8 @@ class DoubleRedirectJob extends Job {
         * @param array|bool $params
         * @param int $id
         */
-       function __construct( $title, $params = false, $id = 0 ) {
-               parent::__construct( 'fixDoubleRedirect', $title, $params, $id );
+       function __construct( $title, $params = false ) {
+               parent::__construct( 'fixDoubleRedirect', $title, $params );
                $this->reason = $params['reason'];
                $this->redirTitle = Title::newFromText( $params['redirTitle'] );
        }
index f24cebb..df8ae63 100644 (file)
@@ -28,8 +28,8 @@
  * @ingroup JobQueue
  */
 class EmaillingJob extends Job {
-       function __construct( $title, $params, $id = 0 ) {
-               parent::__construct( 'sendMail', Title::newMainPage(), $params, $id );
+       function __construct( $title, $params ) {
+               parent::__construct( 'sendMail', Title::newMainPage(), $params );
        }
 
        function run() {
index 97a7af6..1ed99a5 100644 (file)
@@ -27,8 +27,8 @@
  * @ingroup JobQueue
  */
 class EnotifNotifyJob extends Job {
-       function __construct( $title, $params, $id = 0 ) {
-               parent::__construct( 'enotifNotify', $title, $params, $id );
+       function __construct( $title, $params ) {
+               parent::__construct( 'enotifNotify', $title, $params );
        }
 
        function run() {
index 0415906..833616d 100644 (file)
@@ -33,8 +33,8 @@
  * @ingroup JobQueue
  */
 class HTMLCacheUpdateJob extends Job {
-       function __construct( $title, $params = '', $id = 0 ) {
-               parent::__construct( 'htmlCacheUpdate', $title, $params, $id );
+       function __construct( $title, $params = '' ) {
+               parent::__construct( 'htmlCacheUpdate', $title, $params );
                // Base backlink purge jobs can be de-duplicated
                $this->removeDuplicates = ( !isset( $params['range'] ) && !isset( $params['pages'] ) );
        }
index f62419c..1da00a1 100644 (file)
@@ -50,8 +50,8 @@ class NullJob extends Job {
         * @param array $params job parameters (lives, usleep)
         * @param int $id Job id
         */
-       function __construct( $title, $params, $id = 0 ) {
-               parent::__construct( 'null', $title, $params, $id );
+       function __construct( $title, $params ) {
+               parent::__construct( 'null', $title, $params );
                if ( !isset( $this->params['lives'] ) ) {
                        $this->params['lives'] = 1;
                }
index 88ac9cf..d7667f3 100644 (file)
@@ -27,8 +27,8 @@
  * @ingroup Upload
  */
 class PublishStashedFileJob extends Job {
-       public function __construct( $title, $params, $id = 0 ) {
-               parent::__construct( 'PublishStashedFile', $title, $params, $id );
+       public function __construct( $title, $params ) {
+               parent::__construct( 'PublishStashedFile', $title, $params );
                $this->removeDuplicates = true;
        }
 
index c94db75..d8526ee 100644 (file)
@@ -35,8 +35,8 @@
  * @ingroup JobQueue
  */
 class RefreshLinksJob extends Job {
-       function __construct( $title, $params = '', $id = 0 ) {
-               parent::__construct( 'refreshLinks', $title, $params, $id );
+       function __construct( $title, $params = '' ) {
+               parent::__construct( 'refreshLinks', $title, $params );
                // Base backlink update jobs and per-title update jobs can be de-duplicated.
                // If template A changes twice before any jobs run, a clean queue will have:
                //              (A base, A base)
index 332f625..77e3b3f 100644 (file)
@@ -29,8 +29,8 @@
  * @deprecated 1.23
  */
 class RefreshLinksJob2 extends Job {
-       function __construct( $title, $params, $id = 0 ) {
-               parent::__construct( 'refreshLinks2', $title, $params, $id );
+       function __construct( $title, $params ) {
+               parent::__construct( 'refreshLinks2', $title, $params );
                // Base jobs for large templates can easily be de-duplicated
                $this->removeDuplicates = !isset( $params['start'] ) && !isset( $params['end'] );
        }
index 15d523f..2cdac57 100644 (file)
@@ -39,8 +39,8 @@ class UploadFromUrlJob extends Job {
        /** @var User */
        protected $user;
 
-       public function __construct( $title, $params, $id = 0 ) {
-               parent::__construct( 'uploadFromUrl', $title, $params, $id );
+       public function __construct( $title, $params ) {
+               parent::__construct( 'uploadFromUrl', $title, $params );
        }
 
        public function run() {