Set getDeduplicationInfo() for HTMLCacheUpdateJob
[lhc/web/wiklou.git] / includes / jobqueue / jobs / HTMLCacheUpdateJob.php
index e8edab5..4d75cb3 100644 (file)
@@ -169,6 +169,20 @@ class HTMLCacheUpdateJob extends Job {
                }
        }
 
+       public function getDeduplicationInfo() {
+               $info = parent::getDeduplicationInfo();
+               if ( is_array( $info['params'] ) ) {
+                       // For per-pages jobs, the job title is that of the template that changed
+                       // (or similar), so remove that since it ruins duplicate detection
+                       if ( isset( $info['params']['pages'] ) ) {
+                               unset( $info['namespace'] );
+                               unset( $info['title'] );
+                       }
+               }
+
+               return $info;
+       }
+
        public function workItemCount() {
                if ( !empty( $this->params['recursive'] ) ) {
                        return 0; // nothing actually purged