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 ) {
116 'domain' => $this->lbFactory->getLocalDomainID(),
118 'refreshLinksPrioritized',
120 'namespace' => $this->page->getNamespace(),
121 'title' => $this->page->getDBkey(),
123 'rootJobTimestamp' => $this->freshness ?: $this->revisionRecord->getTimestamp(),
124 'useRecursiveLinksUpdate' => $this->recursive,
125 'triggeringUser' => [
126 'userId' => $this->user->getId(),
127 'userName' => $this->user->getName()
129 'triggeringRevisionId' => $this->revisionRecord->getId(),
133 [
'removeDuplicates' => true ]
139class_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.