Make JobQueueRedis stat calls match the DB one
[lhc/web/wiklou.git] / includes / jobqueue / JobSpecification.php
index ecace3a..d59c09b 100644 (file)
@@ -72,6 +72,12 @@ interface IJobSpecification {
         */
        public function hasRootJobParams();
 
+       /**
+        * @see JobQueue::deduplicateRootJob()
+        * @return bool Whether this is job is a root job
+        */
+       public function isRootJob();
+
        /**
         * @return Title Descriptive title (this can simply be informative)
         */
@@ -195,6 +201,10 @@ class JobSpecification implements IJobSpecification {
                        && isset( $this->params['rootJobTimestamp'] );
        }
 
+       public function isRootJob() {
+               return $this->hasRootJobParams() && !empty( $this->params['rootJobIsSelf'] );
+       }
+
        /**
         * @return array Field/value map that can immediately be serialized
         * @since 1.25