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:
parent
c56bc576d6
commit
1bbfb2a313
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue