Push post-edit RefreshLinks jobs into 'refreshLinksPrioritized'
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 20 Oct 2015 21:46:17 +0000 (14:46 -0700)
committerOri.livneh <ori@wikimedia.org>
Tue, 20 Oct 2015 22:25:10 +0000 (22:25 +0000)
Previously the 'prioritize' flag was set in getAsJobSpecification()
but the job still went into the regular 'refreshLinks' queue. Since
the parser cache was just saved, they should be fast to run. The
separate queue stops them from getting stuck behind template updates.

Change-Id: I46c5760702d862dc9288618ee5eff3897f6e838b

includes/deferred/LinksUpdate.php

index d1386c6..b96fa46 100644 (file)
@@ -993,7 +993,11 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate {
                        'wiki' => $this->mDb->getWikiID(),
                        'job'  => new JobSpecification(
                                'refreshLinks',
-                               array( 'prioritize' => true ),
+                               array(
+                                       'prioritize' => true,
+                                       // Reuse the parser cache if it was saved
+                                       'rootJobTimestamp' => $this->mParserOutput->getCacheTime()
+                               ),
                                array( 'removeDuplicates' => true ),
                                $this->getTitle()
                        )