dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c56bc57
)
Non-concurrent pop_type() since the $row === false case was being hit 99% of the...
author
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 12 Jul 2011 08:08:58 +0000
(08:08 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 12 Jul 2011 08:08:58 +0000
(08:08 +0000)
includes/job/JobQueue.php
patch
|
blob
|
history
diff --git
a/includes/job/JobQueue.php
b/includes/job/JobQueue.php
index
953d586
..
0d917ba
100644
(file)
--- a/
includes/job/JobQueue.php
+++ b/
includes/job/JobQueue.php
@@
-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;
}