Call commit with the flush flag in JobQueueDB::doPop, so no warning
is triggered if an automatic transaction is already in progress.
Change-Id: I74f7170671103b0b1ea8afe09e3b105b03dde7e6
$uuid = wfRandomString( 32 ); // pop attempt
$dbw = $this->getMasterDB();
- if ( $dbw->trxLevel() ) {
- wfWarn( "Attempted to pop a job in a transaction; committing first." );
- $dbw->commit(); // push existing transaction
- }
+ $dbw->commit( __METHOD__, 'flush' ); // flush existing transaction
$job = false; // job popped off
$autoTrx = $dbw->getFlag( DBO_TRX ); // automatic begin() enabled?