Fixes related to WikiPage::triggerOpportunisticLinksUpdate()
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 23 Oct 2015 18:48:50 +0000 (11:48 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 24 Oct 2015 00:10:12 +0000 (00:10 +0000)
commitd705ae970a466d70de343e6d6ffa04811ec9812a
tree418dad9ed501153c620c83ae5134da25dc9a3250
parentc8504fc8359317221c306bd2d74feefeecaca91c
Fixes related to WikiPage::triggerOpportunisticLinksUpdate()

* Focus on updating links that would *not* already be updated
  by jobs, not those that already *will* be updated.
* Place the jobs into a dedicated queue so they don't wait
  behind jobs that actually have to parse every time. This
  helps avoid queue buildup.
* Make Job::factory() set the command field to match the value
  it had when enqueued. This makes it easier to have the same
  job class used for multiple queues.
* Given the above, remove the RefreshLinksJob 'prioritize' flag.
  This worked by overriding getType() so that the job went to a
  different queue. This required both the special type *and* the
  flag to be set if using JobSpecification or either ack() would
  route to the wrong queue and fail or the job would go in the
  regular queue. This was too messy and error prone. Cirrus jobs
  using the same pattern also had ack() failures for example.

Change-Id: I5941cb62cdafde203fdee7e106894322ba87b48a
includes/DefaultSettings.php
includes/deferred/LinksUpdate.php
includes/jobqueue/Job.php
includes/jobqueue/jobs/RefreshLinksJob.php
includes/page/WikiPage.php