44 private $revisionRecord;
64 parent::__construct();
66 $this->lbFactory = $lbFactory;
69 $this->revisionRecord = $revisionRecord;
70 $this->updater = $updater;
71 $this->recursive = !empty( $options[
'recursive'] );
72 $this->freshness = $options[
'freshness'] ??
false;
77 return self::TRX_ROUND_ABSENT;
81 $updates = $this->updater->getSecondaryDataUpdates( $this->recursive );
82 foreach ( $updates as $update ) {
84 $update->setRevisionRecord( $this->revisionRecord );
85 $update->setTriggeringUser( $this->user );
88 $update->setCause( $this->causeAction, $this->causeAgent );
94 $this->lbFactory->commitPrimaryChanges( __METHOD__ );
97 foreach ( $updates as $update ) {
100 }
catch ( Exception $e ) {
102 MWExceptionHandler::rollbackPrimaryChangesAndLog( $e );
106 if ( $e instanceof Exception ) {
114 'domain' => $this->lbFactory->getLocalDomainID(),
116 'refreshLinksPrioritized',
118 'namespace' => $this->page->getNamespace(),
119 'title' => $this->page->getDBkey(),
121 'rootJobTimestamp' => $this->freshness ?: $this->revisionRecord->getTimestamp(),
122 'useRecursiveLinksUpdate' => $this->recursive,
123 'triggeringUser' => [
124 'userId' => $this->user->getId(),
125 'userName' => $this->user->getName()
127 'triggeringRevisionId' => $this->revisionRecord->getId(),
131 [
'removeDuplicates' => true ]
137class_alias( RefreshSecondaryDataUpdate::class,
'RefreshSecondaryDataUpdate' );
A handle for managing updates for derived page data on edit, import, purge, etc.
Interface for objects (potentially) representing an editable wiki page.