58 private $revisionRecord;
78 parent::__construct();
80 $this->lbFactory = $lbFactory;
83 $this->revisionRecord = $revisionRecord;
84 $this->updater = $updater;
85 $this->recursive = !empty( $options[
'recursive'] );
86 $this->freshness = $options[
'freshness'] ??
false;
90 return self::TRX_ROUND_ABSENT;
94 $updates = $this->updater->getSecondaryDataUpdates( $this->recursive );
95 foreach ( $updates as $update ) {
97 $update->setRevisionRecord( $this->revisionRecord );
98 $update->setTriggeringUser( $this->user );
101 $update->setCause( $this->causeAction, $this->causeAgent );
107 $this->lbFactory->commitPrimaryChanges( __METHOD__ );
110 foreach ( $updates as $update ) {
113 }
catch ( Exception $e ) {
115 MWExceptionHandler::rollbackPrimaryChangesAndLog( $e );
119 if ( $e instanceof Exception ) {
126 'domain' => $this->lbFactory->getLocalDomainID(),
128 'refreshLinksPrioritized',
130 'namespace' => $this->page->getNamespace(),
131 'title' => $this->page->getDBkey(),
133 'rootJobTimestamp' => $this->freshness ?: $this->revisionRecord->getTimestamp(),
134 'useRecursiveLinksUpdate' => $this->recursive,
135 'triggeringUser' => [
136 'userId' => $this->user->getId(),
137 'userName' => $this->user->getName()
139 'triggeringRevisionId' => $this->revisionRecord->getId(),
143 [
'removeDuplicates' => true ]
149class_alias( RefreshSecondaryDataUpdate::class,
'RefreshSecondaryDataUpdate' );
Job queue task description base code.
Handler class for MWExceptions.
A handle for managing updates for derived page data on edit, import, purge, etc.
Interface for objects (potentially) representing an editable wiki page.