From 430870bad1fe170b36618f4d301a1edde98d0dee Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 16 Oct 2012 13:18:41 +0200 Subject: [PATCH] Use 'flush' flag to end automatic transactions. 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 --- includes/job/JobQueueDB.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php index 3d584ef727..1dd1d44b0d 100644 --- a/includes/job/JobQueueDB.php +++ b/includes/job/JobQueueDB.php @@ -113,10 +113,7 @@ class JobQueueDB extends JobQueue { $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? -- 2.20.1