Merge "Make Language::fetchLanguageName lowercase its first argument."
[lhc/web/wiklou.git] / includes / job / Job.php
index 3f44a91..77652a4 100644 (file)
@@ -28,9 +28,6 @@
  * @ingroup JobQueue
  */
 abstract class Job {
-       /** @var int Job identifier */
-       public $id;
-
        /** @var string */
        public $command;
 
@@ -69,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}`" );
        }
@@ -145,26 +141,16 @@ abstract class Job {
         * @param $command
         * @param $title
         * @param $params array|bool
-        * @param $id int
         */
-       public function __construct( $command, $title, $params = false, $id = 0 ) {
+       public function __construct( $command, $title, $params = false ) {
                $this->command = $command;
                $this->title = $title;
                $this->params = $params;
-               $this->id = $id;
 
                // expensive jobs may set this to true
                $this->removeDuplicates = false;
        }
 
-       /**
-        * @return int May be 0 for jobs stored outside the DB
-        * @deprecated since 1.22
-        */
-       public function getId() {
-               return $this->id;
-       }
-
        /**
         * @return string
         */
@@ -241,7 +227,9 @@ abstract class Job {
        /**
         * @see JobQueue::deduplicateRootJob()
         * @param string $key A key that identifies the task
-        * @return array
+        * @return array Map of:
+        *   - rootJobSignature : hash (e.g. SHA1) that identifies the task
+        *   - rootJobTimestamp : TS_MW timestamp of this instance of the task
         * @since 1.21
         */
        public static function newRootJobParams( $key ) {