Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6120460
InitImageDataJob.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
InitImageDataJob.php
View Options
<?php
namespace
PageImages\Job
;
use
Job
;
use
MediaWiki\Title\Title
;
use
MWExceptionHandler
;
use
RefreshLinks
;
use
Wikimedia\Rdbms\LBFactory
;
class
InitImageDataJob
extends
Job
{
/** @var LBFactory */
private
$lbFactory
;
/**
* @param Title $title Title object associated with this job
* @param array $params Parameters to the job, containing an array of
* page ids representing which pages to process
* @param LBFactory $lbFactory
*/
public
function
__construct
(
Title
$title
,
array
$params
,
LBFactory
$lbFactory
)
{
parent
::
__construct
(
'InitImageDataJob'
,
$title
,
$params
);
$this
->
lbFactory
=
$lbFactory
;
}
/**
* @inheritDoc
*/
public
function
run
()
{
foreach
(
$this
->
params
[
'page_ids'
]
as
$id
)
{
try
{
RefreshLinks
::
fixLinksFromArticle
(
$id
);
$this
->
lbFactory
->
waitForReplication
();
}
catch
(
\Exception
$e
)
{
// There are some broken pages out there that just don't parse.
// Log it and keep on trucking.
MWExceptionHandler
::
logException
(
$e
);
}
}
return
true
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 7 2026, 04:35 (6 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ae/98/23e2d4e57cdb440dc25c490afaf5
Default Alt Text
InitImageDataJob.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment