40 public function run() {
41 if ( $this->title ===
null ) {
46 $pageId = $this->params[
'pageId'];
49 $scopedLock = LinksUpdate::acquirePageLock(
wfGetDB(
DB_PRIMARY ), $pageId,
'job' );
50 if ( $scopedLock ===
null ) {
51 $this->
setLastError(
'LinksUpdate already running for this page, try again later.' );
55 $services = MediaWikiServices::getInstance();
56 $wikiPageFactory = $services->getWikiPageFactory();
57 if ( $wikiPageFactory->newFromID( $pageId, WikiPage::READ_LATEST ) ) {
59 $this->
setLastError(
"deleteLinks: Page #$pageId exists" );
63 $factory = $services->getDBLoadBalancerFactory();
64 $timestamp = $this->params[
'timestamp'] ??
null;
65 $page = $wikiPageFactory->newFromTitle( $this->title );
68 $update->setTransactionTicket( $factory->getEmptyTransactionTicket( __METHOD__ ) );