70 parent::__construct();
77 $this->recursive = !empty( $options[
'recursive'] );
81 return self::TRX_ROUND_ABSENT;
85 $updates = $this->updater->getSecondaryDataUpdates( $this->recursive );
86 foreach ( $updates as $update ) {
88 $update->setRevisionRecord( $this->revisionRecord );
89 $update->setTriggeringUser( $this->user );
92 $update->setCause( $this->causeAction, $this->causeAgent );
98 $this->lbFactory->commitPrimaryChanges( __METHOD__ );
101 foreach ( $updates as $update ) {
104 }
catch ( Exception $e ) {
110 if ( $e instanceof Exception ) {
117 'domain' => $this->lbFactory->getLocalDomainID(),
119 'refreshLinksPrioritized',
121 'namespace' => $this->page->getTitle()->getNamespace(),
122 'title' => $this->page->getTitle()->getDBkey(),
124 'rootJobTimestamp' => $this->revisionRecord
125 ? $this->revisionRecord->getTimestamp()
127 'useRecursiveLinksUpdate' => $this->recursive,
128 'triggeringUser' => $this->user
130 'userId' => $this->user->getId(),
131 'userName' => $this->user->getName()
134 'triggeringRevisionId' => $this->revisionRecord
135 ? $this->revisionRecord->getId()
137 'causeAction' => $this->getCauseAction(),
138 'causeAgent' => $this->getCauseAgent()
140 [
'removeDuplicates' =>
true ]
Abstract base class for update jobs that do something with some secondary data extracted from article...
static attemptUpdate(DeferrableUpdate $update, ILBFactory $lbFactory)
Attempt to run an update with the appropriate transaction round state it expects.
Job queue task description base code.
static rollbackPrimaryChangesAndLog(Throwable $e, $catcher=self::CAUGHT_BY_OTHER)
Roll back any open database transactions and log the stack trace of the throwable.
A handle for managing updates for derived page data on edit, import, purge, etc.
Update object handling the cleanup of secondary data after a page was edited.
RevisionRecord null $revisionRecord
doUpdate()
Perform the actual work.
__construct(ILBFactory $lbFactory, UserIdentity $user, WikiPage $page, RevisionRecord $revisionRecord, DerivedPageDataUpdater $updater, array $options)
DerivedPageDataUpdater $updater
getTransactionRoundRequirement()
Base representation for an editable wiki page.
Interface that marks a DataUpdate as enqueuable via the JobQueue.
Deferrable update that specifies whether it must run outside of any explicit LBFactory transaction ro...