Non-concurrent pop_type() since the $row === false case was being hit 99% of the time on WMF in a backlog situation.

This commit is contained in:
Tim Starling 2011-07-12 08:08:58 +00:00
parent c56bc576d6
commit 1bbfb2a313

View file

@ -56,15 +56,18 @@ abstract class Job {
$dbw = wfGetDB( DB_MASTER );
$dbw->begin();
$row = $dbw->selectRow(
'job',
'*',
array( 'job_cmd' => $type ),
__METHOD__,
array( 'LIMIT' => 1 )
array( 'LIMIT' => 1, 'FOR UPDATE' )
);
if ( $row === false ) {
$dbw->commit();
wfProfileOut( __METHOD__ );
return false;
}