Set RAII $scope variable in DB job queue.
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 13 Jan 2013 19:22:56 +0000 (11:22 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Sun, 13 Jan 2013 19:22:56 +0000 (11:22 -0800)
Change-Id: I03e1396b4485be62a5bb927f987c6b4816d90d47

includes/job/JobQueueDB.php

index 30612fa..1c9c8a7 100644 (file)
@@ -89,7 +89,7 @@ class JobQueueDB extends JobQueue {
                        return $size;
                }
 
-               list( $dbr, ) = $this->getSlaveDB();
+               list( $dbr, $scope ) = $this->getSlaveDB();
                $size = (int)$dbr->selectField( 'job', 'COUNT(*)',
                        array( 'job_cmd' => $this->type, 'job_token' => '' ),
                        __METHOD__
@@ -113,7 +113,7 @@ class JobQueueDB extends JobQueue {
                        return $count;
                }
 
-               list( $dbr, ) = $this->getSlaveDB();
+               list( $dbr, $scope ) = $this->getSlaveDB();
                $count = (int)$dbr->selectField( 'job', 'COUNT(*)',
                        array( 'job_cmd' => $this->type, "job_token !={$dbr->addQuotes('')}" ),
                        __METHOD__