Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/190737
Change subject: Removed old HTMLCacheUpdateJob b/c code
......................................................................
Removed old HTMLCacheUpdateJob b/c code
Change-Id: I9c976cdf93b8d1e171988722adc3695935ac43e0
---
M includes/jobqueue/jobs/HTMLCacheUpdateJob.php
1 file changed, 8 insertions(+), 31 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/37/190737/1
diff --git a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php
b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php
index b4ddd11..9d91565 100644
--- a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php
+++ b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php
@@ -42,17 +42,8 @@
function run() {
global $wgUpdateRowsPerJob, $wgUpdateRowsPerQuery;
- static $expected = array( 'recursive', 'pages' ); // new jobs
have one of these
-
- $oldRangeJob = false;
- if ( !array_intersect( array_keys( $this->params ), $expected )
) {
- // B/C for older job params formats that lack these
fields:
- // a) base jobs with just ("table") and b) range jobs
with ("table","start","end")
- if ( isset( $this->params['start'] ) && isset(
$this->params['end'] ) ) {
- $oldRangeJob = true;
- } else {
- $this->params['recursive'] = true; // base job
- }
+ if ( isset( $this->params['table'] ) && !isset(
$this->params['pages'] ) ) {
+ $this->params['recursive'] = true; // b/c; base job
}
// Job to purge all (or a range of) backlink pages for a page
@@ -70,26 +61,12 @@
// Job to purge pages for a set of titles
} elseif ( isset( $this->params['pages'] ) ) {
$this->invalidateTitles( $this->params['pages'] );
- // B/C for job to purge a range of backlink pages for a given
page
- } elseif ( $oldRangeJob ) {
- $titleArray =
$this->title->getBacklinkCache()->getLinks(
- $this->params['table'], $this->params['start'],
$this->params['end'] );
-
- $pages = array(); // same format BacklinkJobUtils uses
- foreach ( $titleArray as $tl ) {
- $pages[$tl->getArticleId()] = array(
$tl->getNamespace(), $tl->getDbKey() );
- }
-
- $jobs = array();
- foreach ( array_chunk( $pages, $wgUpdateRowsPerJob ) as
$pageChunk ) {
- $jobs[] = new HTMLCacheUpdateJob( $this->title,
- array(
- 'table' =>
$this->params['table'],
- 'pages' => $pageChunk
- ) + $this->getRootJobParams() // carry
over information for de-duplication
- );
- }
- JobQueueGroup::singleton()->push( $jobs );
+ // Job to update a single title
+ } else {
+ $t = $this->title;
+ $this->invalidateTitles( array(
+ $t->getArticleID() => array(
$t->getNamespace(), $t->getDBkey() )
+ ) );
}
return true;
--
To view, visit https://gerrit.wikimedia.org/r/190737
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c976cdf93b8d1e171988722adc3695935ac43e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits