aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/runJobs.php
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2016-09-06 15:25:53 -0700
committerAaron Schulz <aschulz@wikimedia.org>2016-09-07 03:56:37 +0000
commit6c73b32fd5b2a0c17d0fb32935804b6457ccd992 (patch)
treed75c23ce5f54d6ec32f5f0ec7c3a537e28748ade /maintenance/runJobs.php
parentb2585a95b27fc196bcded4c146d1251d9d7740b9 (diff)
downloadmediawikicore-6c73b32fd5b2a0c17d0fb32935804b6457ccd992.tar.gz
mediawikicore-6c73b32fd5b2a0c17d0fb32935804b6457ccd992.zip
Convert JobRunner to using beginMasterChanges()
This lets the runJobs.php $wgCommandLineMode hack be removed. Some fixes based on unit tests: * Only call applyTransactionRoundFlags() for master connections for transaction rounds from beginMasterChanges(). * Also cleaned up the commitAndWaitForReplication() reset logic. * Removed deprecated DataUpdate::doUpdate() calls from jobs since they cannot nest in a transaction round. Change-Id: Ia9b91f539dc11a5c05bdac4bcd99d6615c4dc48d
Diffstat (limited to 'maintenance/runJobs.php')
-rw-r--r--maintenance/runJobs.php8
1 files changed, 0 insertions, 8 deletions
diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php
index c3c239154563..2e011fecde54 100644
--- a/maintenance/runJobs.php
+++ b/maintenance/runJobs.php
@@ -53,8 +53,6 @@ class RunJobs extends Maintenance {
}
public function execute() {
- global $wgCommandLineMode;
-
if ( $this->hasOption( 'procs' ) ) {
$procs = intval( $this->getOption( 'procs' ) );
if ( $procs < 1 || $procs > 1000 ) {
@@ -70,10 +68,6 @@ class RunJobs extends Maintenance {
$outputJSON = ( $this->getOption( 'result' ) === 'json' );
$wait = $this->hasOption( 'wait' );
- // Enable DBO_TRX for atomicity; JobRunner manages transactions
- // and works well in web server mode already (@TODO: this is a hack)
- $wgCommandLineMode = false;
-
$runner = new JobRunner( LoggerFactory::getInstance( 'runJobs' ) );
if ( !$outputJSON ) {
$runner->setDebugHandler( [ $this, 'debugInternal' ] );
@@ -111,8 +105,6 @@ class RunJobs extends Maintenance {
sleep( 1 );
}
-
- $wgCommandLineMode = true;
}
/**