42 public function run() {
43 if ( $this->title ===
null ) {
48 $pageId = $this->params[
'pageId'];
51 $scopedLock = LinksUpdate::acquirePageLock(
wfGetDB(
DB_PRIMARY ), $pageId,
'job' );
52 if ( $scopedLock ===
null ) {
53 $this->
setLastError(
'LinksUpdate already running for this page, try again later.' );
57 $services = MediaWikiServices::getInstance();
58 $wikiPageFactory = $services->getWikiPageFactory();
59 if ( $wikiPageFactory->newFromID( $pageId, WikiPage::READ_LATEST ) ) {
61 $this->
setLastError(
"deleteLinks: Page #$pageId exists" );
65 $factory = $services->getDBLoadBalancerFactory();
66 $timestamp = $this->params[
'timestamp'] ??
null;
67 $page = $wikiPageFactory->newFromTitle( $this->title );
70 $update->setTransactionTicket( $factory->getEmptyTransactionTicket( __METHOD__ ) );