Make LinksUpdate no longer extend EnqueueableDataUpdate
LinksUpdate does not match RefreshLinksJob since the former is only a subset of the later. Also, DeferredUpdates::doUpdates() only runs in "enqueue" mode for cases in MediaWiki::restInPeace() if there is no post-send support. In a future commit, the deferred callback in which LinksUpdate runs currently, will be abstracted into its own deferred update, which will then bring back EnqueueableDataUpdate for this update. Bug: T206283 Change-Id: I0680be445e8b8e8d0dba85df135b84640f4fcb81
This commit is contained in:
parent
a735b3f7c9
commit
29fcd02ef8
1 changed files with 1 additions and 36 deletions
|
|
@ -32,7 +32,7 @@ use Wikimedia\ScopedCallback;
|
|||
*
|
||||
* See docs/deferred.txt
|
||||
*/
|
||||
class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
|
||||
class LinksUpdate extends DataUpdate {
|
||||
// @todo make members protected, but make sure extensions don't break
|
||||
|
||||
/** @var int Page ID of the article linked from */
|
||||
|
|
@ -1192,39 +1192,4 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
|
|||
|
||||
return $this->db;
|
||||
}
|
||||
|
||||
public function getAsJobSpecification() {
|
||||
if ( $this->user ) {
|
||||
$userInfo = [
|
||||
'userId' => $this->user->getId(),
|
||||
'userName' => $this->user->getName(),
|
||||
];
|
||||
} else {
|
||||
$userInfo = false;
|
||||
}
|
||||
|
||||
if ( $this->mRevision ) {
|
||||
$triggeringRevisionId = $this->mRevision->getId();
|
||||
} else {
|
||||
$triggeringRevisionId = false;
|
||||
}
|
||||
|
||||
return [
|
||||
'domain' => $this->getDB()->getDomainID(),
|
||||
'job' => new JobSpecification(
|
||||
'refreshLinksPrioritized',
|
||||
[
|
||||
// Reuse the parser cache if it was saved
|
||||
'rootJobTimestamp' => $this->mParserOutput->getCacheTime(),
|
||||
'useRecursiveLinksUpdate' => $this->mRecursive,
|
||||
'triggeringUser' => $userInfo,
|
||||
'triggeringRevisionId' => $triggeringRevisionId,
|
||||
'causeAction' => $this->getCauseAction(),
|
||||
'causeAgent' => $this->getCauseAgent()
|
||||
],
|
||||
[ 'removeDuplicates' => true ],
|
||||
$this->getTitle()
|
||||
)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue